If you do not have keys already then visit https://www.google.com/recaptcha/admin to generate them. Edit this file and set the respective keys in $siteKey and $secret. Reload the page after this.
-
-
This example is sending the Content-Security-Policy header. Look at the source and inspect the network tab for this request to see what's happening. The reCAPTCHA v3 API is being called here, however you can use the same approach for the v2 API calls as well.
-
NOTE:This is a sample implementation, the score returned here is not a reflection on your Google account or type of traffic. In production, refer to the distribution of scores shown in your admin interface and adjust your own threshold accordingly. Do not raise issues regarding the score you see here.
-
-
reCAPTCHA script loading
-
grecaptcha.ready() fired, calling
grecaptcha.execute('', {action: ''})'
-
Received token from reCAPTCHA service, sending to our backend with:
-
If you do not have keys already then visit https://www.google.com/recaptcha/admin to generate them. Edit this file and set the respective keys in the config.php file or directly to $siteKey and $secret. Reload the page after this.
-
-
POST data
-
- setExpectedHostname($_SERVER['SERVER_NAME'])
- ->verify($_POST['g-recaptcha-response'], $_SERVER['REMOTE_ADDR']);
-
- if ($resp->isSuccess()):
- // If the response is a success, that's it!
- ?>
-
Success!
-
-
That's it. Everything is working. Go integrate this into your real project.
If you do not have keys already then visit https://www.google.com/recaptcha/admin to generate them. Edit this file and set the respective keys in the config.php file or directly to $siteKey and $secret. Reload the page after this.
-
-
POST data
-
- setExpectedHostname($_SERVER['SERVER_NAME'])
- ->verify($_POST['g-recaptcha-response'], $_SERVER['REMOTE_ADDR']);
- if ($resp->isSuccess()):
- // If the response is a success, that's it!
- ?>
-
Success!
-
-
That's it. Everything is working. Go integrate this into your real project.
If you do not have keys already then visit https://www.google.com/recaptcha/admin to generate them. Edit this file and set the respective keys in $siteKey and $secret. Reload the page after this.
-
-
POST data
-
- setExpectedHostname($_SERVER['SERVER_NAME'])
- ->verify($_POST['g-recaptcha-response'], $_SERVER['REMOTE_ADDR']);
- if ($resp->isSuccess()):
- // If the response is a success, that's it!
- ?>
-
Success!
-
-
That's it. Everything is working. Go integrate this into your real project.
If you do not have keys already then visit https://www.google.com/recaptcha/admin to generate them. Edit this file and set the respective keys in $siteKey and $secret. Reload the page after this.
-
-
The reCAPTCHA v3 API provides a confidence score for each request.
-
NOTE:This is a sample implementation, the score returned here is not a reflection on your Google account or type of traffic. In production, refer to the distribution of scores shown in your admin interface and adjust your own threshold accordingly. Do not raise issues regarding the score you see here.
-
-
reCAPTCHA script loading
-
grecaptcha.ready() fired, calling
grecaptcha.execute('', {action: ''})'
-
Received token from reCAPTCHA service, sending to our backend with:
-
-
-
-
-
-
-
-
diff --git a/vendor/google/recaptcha/examples/recaptcha-v3-verify.php b/vendor/google/recaptcha/examples/recaptcha-v3-verify.php
deleted file mode 100644
index 3b6517a..0000000
--- a/vendor/google/recaptcha/examples/recaptcha-v3-verify.php
+++ /dev/null
@@ -1,59 +0,0 @@
-setExpectedHostname($_SERVER['SERVER_NAME'])
- ->setExpectedAction($_GET['action'])
- ->setScoreThreshold(0.5)
- ->verify($_GET['token'], $_SERVER['REMOTE_ADDR']);
-header('Content-type:application/json');
-echo json_encode($resp->toArray());
diff --git a/vendor/google/recaptcha/examples/robots.txt b/vendor/google/recaptcha/examples/robots.txt
deleted file mode 100644
index eb05362..0000000
--- a/vendor/google/recaptcha/examples/robots.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-User-agent: *
-Disallow:
diff --git a/vendor/google/recaptcha/phpunit.xml.dist b/vendor/google/recaptcha/phpunit.xml.dist
deleted file mode 100644
index ae86610..0000000
--- a/vendor/google/recaptcha/phpunit.xml.dist
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
- tests/ReCaptcha/
-
-
-
-
- src/ReCaptcha/
-
-
-
-
-
-
diff --git a/vendor/google/recaptcha/src/ReCaptcha/ReCaptcha.php b/vendor/google/recaptcha/src/ReCaptcha/ReCaptcha.php
index 177fa44..d75ce1f 100644
--- a/vendor/google/recaptcha/src/ReCaptcha/ReCaptcha.php
+++ b/vendor/google/recaptcha/src/ReCaptcha/ReCaptcha.php
@@ -43,73 +43,73 @@ class ReCaptcha
* Version of this client library.
* @const string
*/
- const VERSION = 'php_1.2.3';
+ public const VERSION = 'php_1.3.0';
/**
* URL for reCAPTCHA siteverify API
* @const string
*/
- const SITE_VERIFY_URL = 'https://www.google.com/recaptcha/api/siteverify';
+ public const SITE_VERIFY_URL = 'https://www.google.com/recaptcha/api/siteverify';
/**
* Invalid JSON received
* @const string
*/
- const E_INVALID_JSON = 'invalid-json';
+ public const E_INVALID_JSON = 'invalid-json';
/**
* Could not connect to service
* @const string
*/
- const E_CONNECTION_FAILED = 'connection-failed';
+ public const E_CONNECTION_FAILED = 'connection-failed';
/**
* Did not receive a 200 from the service
* @const string
*/
- const E_BAD_RESPONSE = 'bad-response';
+ public const E_BAD_RESPONSE = 'bad-response';
/**
* Not a success, but no error codes received!
* @const string
*/
- const E_UNKNOWN_ERROR = 'unknown-error';
+ public const E_UNKNOWN_ERROR = 'unknown-error';
/**
* ReCAPTCHA response not provided
* @const string
*/
- const E_MISSING_INPUT_RESPONSE = 'missing-input-response';
+ public const E_MISSING_INPUT_RESPONSE = 'missing-input-response';
/**
* Expected hostname did not match
* @const string
*/
- const E_HOSTNAME_MISMATCH = 'hostname-mismatch';
+ public const E_HOSTNAME_MISMATCH = 'hostname-mismatch';
/**
* Expected APK package name did not match
* @const string
*/
- const E_APK_PACKAGE_NAME_MISMATCH = 'apk_package_name-mismatch';
+ public const E_APK_PACKAGE_NAME_MISMATCH = 'apk_package_name-mismatch';
/**
* Expected action did not match
* @const string
*/
- const E_ACTION_MISMATCH = 'action-mismatch';
+ public const E_ACTION_MISMATCH = 'action-mismatch';
/**
* Score threshold not met
* @const string
*/
- const E_SCORE_THRESHOLD_NOT_MET = 'score-threshold-not-met';
+ public const E_SCORE_THRESHOLD_NOT_MET = 'score-threshold-not-met';
/**
* Challenge timeout
* @const string
*/
- const E_CHALLENGE_TIMEOUT = 'challenge-timeout';
+ public const E_CHALLENGE_TIMEOUT = 'challenge-timeout';
/**
* Shared secret for the site.
@@ -123,6 +123,12 @@ class ReCaptcha
*/
private $requestMethod;
+ private $hostname;
+ private $apkPackageName;
+ private $action;
+ private $threshold;
+ private $timeoutSeconds;
+
/**
* Create a configured instance to use the reCAPTCHA service.
*
diff --git a/vendor/google/recaptcha/src/ReCaptcha/RequestMethod.php b/vendor/google/recaptcha/src/ReCaptcha/RequestMethod.php
index 0a2a671..bd2a949 100644
--- a/vendor/google/recaptcha/src/ReCaptcha/RequestMethod.php
+++ b/vendor/google/recaptcha/src/ReCaptcha/RequestMethod.php
@@ -39,7 +39,6 @@ namespace ReCaptcha;
*/
interface RequestMethod
{
-
/**
* Submit the request with the specified parameters.
*
diff --git a/vendor/google/recaptcha/src/ReCaptcha/RequestMethod/Curl.php b/vendor/google/recaptcha/src/ReCaptcha/RequestMethod/Curl.php
index eb99842..2d3b389 100644
--- a/vendor/google/recaptcha/src/ReCaptcha/RequestMethod/Curl.php
+++ b/vendor/google/recaptcha/src/ReCaptcha/RequestMethod/Curl.php
@@ -39,7 +39,6 @@ namespace ReCaptcha\RequestMethod;
*/
class Curl
{
-
/**
* @see http://php.net/curl_init
* @param string $url
diff --git a/vendor/google/recaptcha/src/ReCaptcha/RequestMethod/SocketPost.php b/vendor/google/recaptcha/src/ReCaptcha/RequestMethod/SocketPost.php
index 7edffb8..19d50ab 100644
--- a/vendor/google/recaptcha/src/ReCaptcha/RequestMethod/SocketPost.php
+++ b/vendor/google/recaptcha/src/ReCaptcha/RequestMethod/SocketPost.php
@@ -51,6 +51,8 @@ class SocketPost implements RequestMethod
*/
private $socket;
+ private $siteVerifyUrl;
+
/**
* Only needed if you want to override the defaults
*
@@ -81,7 +83,7 @@ class SocketPost implements RequestMethod
$content = $params->toQueryString();
- $request = "POST " . $urlParsed['path'] . " HTTP/1.1\r\n";
+ $request = "POST " . $urlParsed['path'] . " HTTP/1.0\r\n";
$request .= "Host: " . $urlParsed['host'] . "\r\n";
$request .= "Content-Type: application/x-www-form-urlencoded\r\n";
$request .= "Content-length: " . strlen($content) . "\r\n";
@@ -97,7 +99,7 @@ class SocketPost implements RequestMethod
$this->socket->fclose();
- if (0 !== strpos($response, 'HTTP/1.1 200 OK')) {
+ if (0 !== strpos($response, 'HTTP/1.0 200 OK')) {
return '{"success": false, "error-codes": ["'.ReCaptcha::E_BAD_RESPONSE.'"]}';
}
diff --git a/vendor/google/recaptcha/src/ReCaptcha/Response.php b/vendor/google/recaptcha/src/ReCaptcha/Response.php
index 55838c0..8a5d3aa 100644
--- a/vendor/google/recaptcha/src/ReCaptcha/Response.php
+++ b/vendor/google/recaptcha/src/ReCaptcha/Response.php
@@ -95,11 +95,11 @@ class Response
return new Response(false, array(ReCaptcha::E_INVALID_JSON));
}
- $hostname = isset($responseData['hostname']) ? $responseData['hostname'] : null;
- $challengeTs = isset($responseData['challenge_ts']) ? $responseData['challenge_ts'] : null;
- $apkPackageName = isset($responseData['apk_package_name']) ? $responseData['apk_package_name'] : null;
+ $hostname = isset($responseData['hostname']) ? $responseData['hostname'] : '';
+ $challengeTs = isset($responseData['challenge_ts']) ? $responseData['challenge_ts'] : '';
+ $apkPackageName = isset($responseData['apk_package_name']) ? $responseData['apk_package_name'] : '';
$score = isset($responseData['score']) ? floatval($responseData['score']) : null;
- $action = isset($responseData['action']) ? $responseData['action'] : null;
+ $action = isset($responseData['action']) ? $responseData['action'] : '';
if (isset($responseData['success']) && $responseData['success'] == true) {
return new Response(true, array(), $hostname, $challengeTs, $apkPackageName, $score, $action);
@@ -123,7 +123,7 @@ class Response
* @param string $action
* @param array $errorCodes
*/
- public function __construct($success, array $errorCodes = array(), $hostname = null, $challengeTs = null, $apkPackageName = null, $score = null, $action = null)
+ public function __construct($success, array $errorCodes = array(), $hostname = '', $challengeTs = '', $apkPackageName = '', $score = null, $action = '')
{
$this->success = $success;
$this->hostname = $hostname;
diff --git a/vendor/google/recaptcha/tests/ReCaptcha/ReCaptchaTest.php b/vendor/google/recaptcha/tests/ReCaptcha/ReCaptchaTest.php
deleted file mode 100644
index ddb16f0..0000000
--- a/vendor/google/recaptcha/tests/ReCaptcha/ReCaptchaTest.php
+++ /dev/null
@@ -1,198 +0,0 @@
-verify('');
- $this->assertFalse($response->isSuccess());
- $this->assertEquals(array(Recaptcha::E_MISSING_INPUT_RESPONSE), $response->getErrorCodes());
- }
-
- private function getMockRequestMethod($responseJson)
- {
- $method = $this->getMockBuilder(\ReCaptcha\RequestMethod::class)
- ->disableOriginalConstructor()
- ->setMethods(array('submit'))
- ->getMock();
- $method->expects($this->any())
- ->method('submit')
- ->with($this->callback(function ($params) {
- return true;
- }))
- ->will($this->returnValue($responseJson));
- return $method;
- }
-
- public function testVerifyReturnsResponse()
- {
- $method = $this->getMockRequestMethod('{"success": true}');
- $rc = new ReCaptcha('secret', $method);
- $response = $rc->verify('response');
- $this->assertTrue($response->isSuccess());
- }
-
- public function testVerifyReturnsInitialResponseWithoutAdditionalChecks()
- {
- $method = $this->getMockRequestMethod('{"success": true}');
- $rc = new ReCaptcha('secret', $method);
- $initialResponse = $rc->verify('response');
- $this->assertEquals($initialResponse, $rc->verify('response'));
- }
-
- public function testVerifyHostnameMatch()
- {
- $method = $this->getMockRequestMethod('{"success": true, "hostname": "host.name"}');
- $rc = new ReCaptcha('secret', $method);
- $response = $rc->setExpectedHostname('host.name')->verify('response');
- $this->assertTrue($response->isSuccess());
- }
-
- public function testVerifyHostnameMisMatch()
- {
- $method = $this->getMockRequestMethod('{"success": true, "hostname": "host.NOTname"}');
- $rc = new ReCaptcha('secret', $method);
- $response = $rc->setExpectedHostname('host.name')->verify('response');
- $this->assertFalse($response->isSuccess());
- $this->assertEquals(array(ReCaptcha::E_HOSTNAME_MISMATCH), $response->getErrorCodes());
- }
-
- public function testVerifyApkPackageNameMatch()
- {
- $method = $this->getMockRequestMethod('{"success": true, "apk_package_name": "apk.name"}');
- $rc = new ReCaptcha('secret', $method);
- $response = $rc->setExpectedApkPackageName('apk.name')->verify('response');
- $this->assertTrue($response->isSuccess());
- }
-
- public function testVerifyApkPackageNameMisMatch()
- {
- $method = $this->getMockRequestMethod('{"success": true, "apk_package_name": "apk.NOTname"}');
- $rc = new ReCaptcha('secret', $method);
- $response = $rc->setExpectedApkPackageName('apk.name')->verify('response');
- $this->assertFalse($response->isSuccess());
- $this->assertEquals(array(ReCaptcha::E_APK_PACKAGE_NAME_MISMATCH), $response->getErrorCodes());
- }
-
- public function testVerifyActionMatch()
- {
- $method = $this->getMockRequestMethod('{"success": true, "action": "action/name"}');
- $rc = new ReCaptcha('secret', $method);
- $response = $rc->setExpectedAction('action/name')->verify('response');
- $this->assertTrue($response->isSuccess());
- }
-
- public function testVerifyActionMisMatch()
- {
- $method = $this->getMockRequestMethod('{"success": true, "action": "action/NOTname"}');
- $rc = new ReCaptcha('secret', $method);
- $response = $rc->setExpectedAction('action/name')->verify('response');
- $this->assertFalse($response->isSuccess());
- $this->assertEquals(array(ReCaptcha::E_ACTION_MISMATCH), $response->getErrorCodes());
- }
-
- public function testVerifyAboveThreshold()
- {
- $method = $this->getMockRequestMethod('{"success": true, "score": "0.9"}');
- $rc = new ReCaptcha('secret', $method);
- $response = $rc->setScoreThreshold('0.5')->verify('response');
- $this->assertTrue($response->isSuccess());
- }
-
- public function testVerifyBelowThreshold()
- {
- $method = $this->getMockRequestMethod('{"success": true, "score": "0.1"}');
- $rc = new ReCaptcha('secret', $method);
- $response = $rc->setScoreThreshold('0.5')->verify('response');
- $this->assertFalse($response->isSuccess());
- $this->assertEquals(array(ReCaptcha::E_SCORE_THRESHOLD_NOT_MET), $response->getErrorCodes());
- }
-
- public function testVerifyWithinTimeout()
- {
- // Responses come back like 2018-07-31T13:48:41Z
- $challengeTs = date('Y-M-d\TH:i:s\Z', time());
- $method = $this->getMockRequestMethod('{"success": true, "challenge_ts": "'.$challengeTs.'"}');
- $rc = new ReCaptcha('secret', $method);
- $response = $rc->setChallengeTimeout('1000')->verify('response');
- $this->assertTrue($response->isSuccess());
- }
-
- public function testVerifyOverTimeout()
- {
- // Responses come back like 2018-07-31T13:48:41Z
- $challengeTs = date('Y-M-d\TH:i:s\Z', time() - 600);
- $method = $this->getMockRequestMethod('{"success": true, "challenge_ts": "'.$challengeTs.'"}');
- $rc = new ReCaptcha('secret', $method);
- $response = $rc->setChallengeTimeout('60')->verify('response');
- $this->assertFalse($response->isSuccess());
- $this->assertEquals(array(ReCaptcha::E_CHALLENGE_TIMEOUT), $response->getErrorCodes());
- }
-
- public function testVerifyMergesErrors()
- {
- $method = $this->getMockRequestMethod('{"success": false, "error-codes": ["initial-error"], "score": "0.1"}');
- $rc = new ReCaptcha('secret', $method);
- $response = $rc->setScoreThreshold('0.5')->verify('response');
- $this->assertFalse($response->isSuccess());
- $this->assertEquals(array('initial-error', ReCaptcha::E_SCORE_THRESHOLD_NOT_MET), $response->getErrorCodes());
- }
-}
diff --git a/vendor/google/recaptcha/tests/ReCaptcha/RequestMethod/CurlPostTest.php b/vendor/google/recaptcha/tests/ReCaptcha/RequestMethod/CurlPostTest.php
deleted file mode 100644
index 8fb17dc..0000000
--- a/vendor/google/recaptcha/tests/ReCaptcha/RequestMethod/CurlPostTest.php
+++ /dev/null
@@ -1,123 +0,0 @@
-markTestSkipped(
- 'The cURL extension is not available.'
- );
- }
- }
-
- public function testSubmit()
- {
- $curl = $this->getMockBuilder(\ReCaptcha\RequestMethod\Curl::class)
- ->disableOriginalConstructor()
- ->setMethods(array('init', 'setoptArray', 'exec', 'close'))
- ->getMock();
- $curl->expects($this->once())
- ->method('init')
- ->willReturn(new \stdClass);
- $curl->expects($this->once())
- ->method('setoptArray')
- ->willReturn(true);
- $curl->expects($this->once())
- ->method('exec')
- ->willReturn('RESPONSEBODY');
- $curl->expects($this->once())
- ->method('close');
-
- $pc = new CurlPost($curl);
- $response = $pc->submit(new RequestParameters("secret", "response"));
- $this->assertEquals('RESPONSEBODY', $response);
- }
-
- public function testOverrideSiteVerifyUrl()
- {
- $url = 'OVERRIDE';
-
- $curl = $this->getMockBuilder(\ReCaptcha\RequestMethod\Curl::class)
- ->disableOriginalConstructor()
- ->setMethods(array('init', 'setoptArray', 'exec', 'close'))
- ->getMock();
- $curl->expects($this->once())
- ->method('init')
- ->with($url)
- ->willReturn(new \stdClass);
- $curl->expects($this->once())
- ->method('setoptArray')
- ->willReturn(true);
- $curl->expects($this->once())
- ->method('exec')
- ->willReturn('RESPONSEBODY');
- $curl->expects($this->once())
- ->method('close');
-
- $pc = new CurlPost($curl, $url);
- $response = $pc->submit(new RequestParameters("secret", "response"));
- $this->assertEquals('RESPONSEBODY', $response);
- }
-
- public function testConnectionFailureReturnsError()
- {
- $curl = $this->getMockBuilder(\ReCaptcha\RequestMethod\Curl::class)
- ->disableOriginalConstructor()
- ->setMethods(array('init', 'setoptArray', 'exec', 'close'))
- ->getMock();
- $curl->expects($this->once())
- ->method('init')
- ->willReturn(new \stdClass);
- $curl->expects($this->once())
- ->method('setoptArray')
- ->willReturn(true);
- $curl->expects($this->once())
- ->method('exec')
- ->willReturn(false);
- $curl->expects($this->once())
- ->method('close');
-
- $pc = new CurlPost($curl);
- $response = $pc->submit(new RequestParameters("secret", "response"));
- $this->assertEquals('{"success": false, "error-codes": ["'.ReCaptcha::E_CONNECTION_FAILED.'"]}', $response);
- }
-}
diff --git a/vendor/google/recaptcha/tests/ReCaptcha/RequestMethod/PostTest.php b/vendor/google/recaptcha/tests/ReCaptcha/RequestMethod/PostTest.php
deleted file mode 100644
index bdfb78e..0000000
--- a/vendor/google/recaptcha/tests/ReCaptcha/RequestMethod/PostTest.php
+++ /dev/null
@@ -1,149 +0,0 @@
-parameters = new RequestParameters('secret', 'response', 'remoteip', 'version');
- }
-
- public function tearDown()
- {
- self::$assert = null;
- }
-
- public function testHTTPContextOptions()
- {
- $req = new Post();
- self::$assert = array($this, 'httpContextOptionsCallback');
- $req->submit($this->parameters);
- $this->assertEquals(1, $this->runcount, 'The assertion was ran');
- }
-
- public function testSSLContextOptions()
- {
- $req = new Post();
- self::$assert = array($this, 'sslContextOptionsCallback');
- $req->submit($this->parameters);
- $this->assertEquals(1, $this->runcount, 'The assertion was ran');
- }
-
- public function testOverrideVerifyUrl()
- {
- $req = new Post('https://over.ride/some/path');
- self::$assert = array($this, 'overrideUrlOptions');
- $req->submit($this->parameters);
- $this->assertEquals(1, $this->runcount, 'The assertion was ran');
- }
-
- public function testConnectionFailureReturnsError()
- {
- $req = new Post('https://bad.connection/');
- self::$assert = array($this, 'connectionFailureResponse');
- $response = $req->submit($this->parameters);
- $this->assertEquals('{"success": false, "error-codes": ["'.ReCaptcha::E_CONNECTION_FAILED.'"]}', $response);
- }
-
- public function connectionFailureResponse()
- {
- return false;
- }
- public function overrideUrlOptions(array $args)
- {
- $this->runcount++;
- $this->assertEquals('https://over.ride/some/path', $args[0]);
- }
-
- public function httpContextOptionsCallback(array $args)
- {
- $this->runcount++;
- $this->assertCommonOptions($args);
-
- $options = stream_context_get_options($args[2]);
- $this->assertArrayHasKey('http', $options);
-
- $this->assertArrayHasKey('method', $options['http']);
- $this->assertEquals('POST', $options['http']['method']);
-
- $this->assertArrayHasKey('content', $options['http']);
- $this->assertEquals($this->parameters->toQueryString(), $options['http']['content']);
-
- $this->assertArrayHasKey('header', $options['http']);
- $headers = array(
- 'Content-type: application/x-www-form-urlencoded',
- );
- foreach ($headers as $header) {
- $this->assertContains($header, $options['http']['header']);
- }
- }
-
- public function sslContextOptionsCallback(array $args)
- {
- $this->runcount++;
- $this->assertCommonOptions($args);
-
- $options = stream_context_get_options($args[2]);
- $this->assertArrayHasKey('http', $options);
- $this->assertArrayHasKey('verify_peer', $options['http']);
- $this->assertTrue($options['http']['verify_peer']);
- }
-
- protected function assertCommonOptions(array $args)
- {
- $this->assertCount(3, $args);
- $this->assertStringStartsWith('https://www.google.com/', $args[0]);
- $this->assertFalse($args[1]);
- $this->assertTrue(is_resource($args[2]), 'The context options should be a resource');
- }
-}
-
-function file_get_contents()
-{
- if (PostTest::$assert) {
- return call_user_func(PostTest::$assert, func_get_args());
- }
- // Since we can't represent maxlen in userland...
- return call_user_func_array('file_get_contents', func_get_args());
-}
diff --git a/vendor/google/recaptcha/tests/ReCaptcha/RequestMethod/SocketPostTest.php b/vendor/google/recaptcha/tests/ReCaptcha/RequestMethod/SocketPostTest.php
deleted file mode 100644
index 8656be4..0000000
--- a/vendor/google/recaptcha/tests/ReCaptcha/RequestMethod/SocketPostTest.php
+++ /dev/null
@@ -1,136 +0,0 @@
-getMockBuilder(\ReCaptcha\RequestMethod\Socket::class)
- ->disableOriginalConstructor()
- ->setMethods(array('fsockopen', 'fwrite', 'fgets', 'feof', 'fclose'))
- ->getMock();
- $socket->expects($this->once())
- ->method('fsockopen')
- ->willReturn(true);
- $socket->expects($this->once())
- ->method('fwrite');
- $socket->expects($this->once())
- ->method('fgets')
- ->willReturn("HTTP/1.1 200 OK\n\nRESPONSEBODY");
- $socket->expects($this->exactly(2))
- ->method('feof')
- ->will($this->onConsecutiveCalls(false, true));
- $socket->expects($this->once())
- ->method('fclose')
- ->willReturn(true);
-
- $ps = new SocketPost($socket);
- $response = $ps->submit(new RequestParameters("secret", "response", "remoteip", "version"));
- $this->assertEquals('RESPONSEBODY', $response);
- }
-
- public function testOverrideSiteVerifyUrl()
- {
- $socket = $this->getMockBuilder(\ReCaptcha\RequestMethod\Socket::class)
- ->disableOriginalConstructor()
- ->setMethods(array('fsockopen', 'fwrite', 'fgets', 'feof', 'fclose'))
- ->getMock();
- $socket->expects($this->once())
- ->method('fsockopen')
- ->with('ssl://over.ride', 443, 0, '', 30)
- ->willReturn(true);
- $socket->expects($this->once())
- ->method('fwrite')
- ->with($this->matchesRegularExpression('/^POST \/some\/path.*Host: over\.ride/s'));
- $socket->expects($this->once())
- ->method('fgets')
- ->willReturn("HTTP/1.1 200 OK\n\nRESPONSEBODY");
- $socket->expects($this->exactly(2))
- ->method('feof')
- ->will($this->onConsecutiveCalls(false, true));
- $socket->expects($this->once())
- ->method('fclose')
- ->willReturn(true);
-
- $ps = new SocketPost($socket, 'https://over.ride/some/path');
- $response = $ps->submit(new RequestParameters("secret", "response", "remoteip", "version"));
- $this->assertEquals('RESPONSEBODY', $response);
- }
-
- public function testSubmitBadResponse()
- {
- $socket = $this->getMockBuilder(\ReCaptcha\RequestMethod\Socket::class)
- ->disableOriginalConstructor()
- ->setMethods(array('fsockopen', 'fwrite', 'fgets', 'feof', 'fclose'))
- ->getMock();
- $socket->expects($this->once())
- ->method('fsockopen')
- ->willReturn(true);
- $socket->expects($this->once())
- ->method('fwrite');
- $socket->expects($this->once())
- ->method('fgets')
- ->willReturn("HTTP/1.1 500 NOPEn\\nBOBBINS");
- $socket->expects($this->exactly(2))
- ->method('feof')
- ->will($this->onConsecutiveCalls(false, true));
- $socket->expects($this->once())
- ->method('fclose')
- ->willReturn(true);
-
- $ps = new SocketPost($socket);
- $response = $ps->submit(new RequestParameters("secret", "response", "remoteip", "version"));
- $this->assertEquals('{"success": false, "error-codes": ["'.ReCaptcha::E_BAD_RESPONSE.'"]}', $response);
- }
-
- public function testConnectionFailureReturnsError()
- {
- $socket = $this->getMockBuilder(\ReCaptcha\RequestMethod\Socket::class)
- ->disableOriginalConstructor()
- ->setMethods(array('fsockopen'))
- ->getMock();
- $socket->expects($this->once())
- ->method('fsockopen')
- ->willReturn(false);
- $ps = new SocketPost($socket);
- $response = $ps->submit(new RequestParameters("secret", "response", "remoteip", "version"));
- $this->assertEquals('{"success": false, "error-codes": ["'.ReCaptcha::E_CONNECTION_FAILED.'"]}', $response);
- }
-}
diff --git a/vendor/google/recaptcha/tests/ReCaptcha/RequestParametersTest.php b/vendor/google/recaptcha/tests/ReCaptcha/RequestParametersTest.php
deleted file mode 100644
index fafded2..0000000
--- a/vendor/google/recaptcha/tests/ReCaptcha/RequestParametersTest.php
+++ /dev/null
@@ -1,70 +0,0 @@
- 'SECRET', 'response' => 'RESPONSE', 'remoteip' => 'REMOTEIP', 'version' => 'VERSION'),
- 'secret=SECRET&response=RESPONSE&remoteip=REMOTEIP&version=VERSION'),
- array('SECRET', 'RESPONSE', null, null,
- array('secret' => 'SECRET', 'response' => 'RESPONSE'),
- 'secret=SECRET&response=RESPONSE'),
- );
- }
-
- /**
- * @dataProvider provideValidData
- */
- public function testToArray($secret, $response, $remoteIp, $version, $expectedArray, $expectedQuery)
- {
- $params = new RequestParameters($secret, $response, $remoteIp, $version);
- $this->assertEquals($params->toArray(), $expectedArray);
- }
-
- /**
- * @dataProvider provideValidData
- */
- public function testToQueryString($secret, $response, $remoteIp, $version, $expectedArray, $expectedQuery)
- {
- $params = new RequestParameters($secret, $response, $remoteIp, $version);
- $this->assertEquals($params->toQueryString(), $expectedQuery);
- }
-}
diff --git a/vendor/google/recaptcha/tests/ReCaptcha/ResponseTest.php b/vendor/google/recaptcha/tests/ReCaptcha/ResponseTest.php
deleted file mode 100644
index 7894c2a..0000000
--- a/vendor/google/recaptcha/tests/ReCaptcha/ResponseTest.php
+++ /dev/null
@@ -1,173 +0,0 @@
-assertEquals($success, $response->isSuccess());
- $this->assertEquals($errorCodes, $response->getErrorCodes());
- $this->assertEquals($hostname, $response->getHostname());
- $this->assertEquals($challengeTs, $response->getChallengeTs());
- $this->assertEquals($apkPackageName, $response->getApkPackageName());
- $this->assertEquals($score, $response->getScore());
- $this->assertEquals($action, $response->getAction());
- }
-
- public function provideJson()
- {
- return array(
- array(
- '{"success": true}',
- true, array(), null, null, null, null, null,
- ),
- array(
- '{"success": true, "hostname": "google.com"}',
- true, array(), 'google.com', null, null, null, null,
- ),
- array(
- '{"success": false, "error-codes": ["test"]}',
- false, array('test'), null, null, null, null, null,
- ),
- array(
- '{"success": false, "error-codes": ["test"], "hostname": "google.com"}',
- false, array('test'), 'google.com', null, null, null, null,
- ),
- array(
- '{"success": false, "error-codes": ["test"], "hostname": "google.com", "challenge_ts": "timestamp", "apk_package_name": "apk", "score": "0.5", "action": "action"}',
- false, array('test'), 'google.com', 'timestamp', 'apk', 0.5, 'action',
- ),
- array(
- '{"success": true, "error-codes": ["test"]}',
- true, array(), null, null, null, null, null,
- ),
- array(
- '{"success": true, "error-codes": ["test"], "hostname": "google.com"}',
- true, array(), 'google.com', null, null, null, null,
- ),
- array(
- '{"success": false}',
- false, array(ReCaptcha::E_UNKNOWN_ERROR), null, null, null, null, null,
- ),
- array(
- '{"success": false, "hostname": "google.com"}',
- false, array(ReCaptcha::E_UNKNOWN_ERROR), 'google.com', null, null, null, null,
- ),
- array(
- 'BAD JSON',
- false, array(ReCaptcha::E_INVALID_JSON), null, null, null, null, null,
- ),
- );
- }
-
- public function testIsSuccess()
- {
- $response = new Response(true);
- $this->assertTrue($response->isSuccess());
-
- $response = new Response(false);
- $this->assertFalse($response->isSuccess());
-
- $response = new Response(true, array(), 'example.com');
- $this->assertEquals('example.com', $response->getHostName());
- }
-
- public function testGetErrorCodes()
- {
- $errorCodes = array('test');
- $response = new Response(true, $errorCodes);
- $this->assertEquals($errorCodes, $response->getErrorCodes());
- }
-
- public function testGetHostname()
- {
- $hostname = 'google.com';
- $errorCodes = array();
- $response = new Response(true, $errorCodes, $hostname);
- $this->assertEquals($hostname, $response->getHostname());
- }
-
- public function testGetChallengeTs()
- {
- $timestamp = 'timestamp';
- $errorCodes = array();
- $response = new Response(true, array(), 'hostname', $timestamp);
- $this->assertEquals($timestamp, $response->getChallengeTs());
- }
-
- public function TestGetApkPackageName()
- {
- $apk = 'apk';
- $response = new Response(true, array(), 'hostname', 'timestamp', 'apk');
- $this->assertEquals($apk, $response->getApkPackageName());
- }
-
- public function testGetScore()
- {
- $score = 0.5;
- $response = new Response(true, array(), 'hostname', 'timestamp', 'apk', $score);
- $this->assertEquals($score, $response->getScore());
- }
-
- public function testGetAction()
- {
- $action = 'homepage';
- $response = new Response(true, array(), 'hostname', 'timestamp', 'apk', '0.5', 'homepage');
- $this->assertEquals($action, $response->getAction());
- }
-
- public function testToArray()
- {
- $response = new Response(true, array(), 'hostname', 'timestamp', 'apk', '0.5', 'homepage');
- $expected = array(
- 'success' => true,
- 'error-codes' => array(),
- 'hostname' => 'hostname',
- 'challenge_ts' => 'timestamp',
- 'apk_package_name' => 'apk',
- 'score' => 0.5,
- 'action' => 'homepage',
- );
- $this->assertEquals($expected, $response->toArray());
- }
-}
diff --git a/vendor/kanellov/slim-twig-flash/LICENSE b/vendor/kanellov/slim-twig-flash/LICENSE
deleted file mode 100644
index 9cecc1d..0000000
--- a/vendor/kanellov/slim-twig-flash/LICENSE
+++ /dev/null
@@ -1,674 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc.
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- {one line to give the program's name and a brief idea of what it does.}
- Copyright (C) {year} {name of author}
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- {project} Copyright (C) {year} {fullname}
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-.
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-.
diff --git a/vendor/kanellov/slim-twig-flash/README.md b/vendor/kanellov/slim-twig-flash/README.md
deleted file mode 100644
index b3a73cf..0000000
--- a/vendor/kanellov/slim-twig-flash/README.md
+++ /dev/null
@@ -1,53 +0,0 @@
-# Slim Twig Flash
-A Twig extension to access Slim Flash messages in templates.
-
-| **master** | **develop** |
-|------------|--------------|
-| [](https://travis-ci.org/kanellov/slim-twig-flash) | [](https://travis-ci.org/kanellov/slim-twig-flash) |
-
-## Install
-
-Via [Composer](https://getcomposer.org/)
-
-``` terminal
-composer require kanellov/slim-twig-flash
-```
-
-Requires:
-
-- PHP 5.5.0 or newer
-- Slim Framework Flash Messages 0.1.0 or newer
-- Twig 1.18.0 or newer
-
-## Usage
-
-- Add extension to your twig view
-
-``` php
-...
-$view->addExtension(new Knlv\Slim\Views\TwigMessages(
- new Slim\Flash\Messages()
-));
-...
-```
-
-- In templates use `flash()` or `flash('some_key')` to fetch messages from Flash service
-
-``` html
-...
-
- {% for msg in flash('error') %}
-
{{ msg }}
- {% endfor %}
-
-...
-```
-
-## Testing
-
-``` terminal
-phpunit
-```
-
-## License
-The GNU GENERAL PUBLIC LICENSE Version 3. Please see [License File](LICENSE) for more information.
diff --git a/vendor/kanellov/slim-twig-flash/composer.json b/vendor/kanellov/slim-twig-flash/composer.json
deleted file mode 100644
index 40a6d22..0000000
--- a/vendor/kanellov/slim-twig-flash/composer.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "name": "kanellov/slim-twig-flash",
- "type": "library",
- "description": "A Twig extension to access Slim Flash messages in templates",
- "license": "GNU GPLv3",
- "keywords": ["slim","framework","provider","flash","message", "twig", "extension", "view"],
- "authors": [
- {
- "name": "Vassilis Kanellopoulos",
- "email": "contact@kanellov.com",
- "homepage": "http://kanellov.com"
- }
- ],
- "require": {
- "php": ">=5.5.0",
- "twig/twig": ">=1.18",
- "slim/flash": ">=0.1.0"
- },
- "require-dev": {
- "friendsofphp/php-cs-fixer": "1.*",
- "phpunit/PHPUnit": "4.8.0",
- "satooshi/php-coveralls": "dev-master",
- "phpunit/phpcov": "2.*"
- },
- "autoload": {
- "psr-4": {
- "Knlv\\Slim\\Views\\": "src"
- }
- }
-}
diff --git a/vendor/kanellov/slim-twig-flash/src/TwigMessages.php b/vendor/kanellov/slim-twig-flash/src/TwigMessages.php
deleted file mode 100644
index 9198728..0000000
--- a/vendor/kanellov/slim-twig-flash/src/TwigMessages.php
+++ /dev/null
@@ -1,71 +0,0 @@
-
- * @license GNU GPLv3 http://www.gnu.org/licenses/gpl-3.0-standalone.html
- */
-namespace Knlv\Slim\Views;
-
-use Slim\Flash\Messages;
-use Twig_Extension;
-use Twig_SimpleFunction;
-
-class TwigMessages extends Twig_Extension
-{
- /**
- * @var Messages
- */
- protected $flash;
-
- /**
- * Constructor.
- *
- * @param Messages $flash the Flash messages service provider
- */
- public function __construct(Messages $flash)
- {
- $this->flash = $flash;
- }
-
- /**
- * Extension name.
- *
- * @return string
- */
- public function getName()
- {
- return 'slim-twig-flash';
- }
-
- /**
- * Callback for twig.
- *
- * @return array
- */
- public function getFunctions()
- {
- return [
- new Twig_SimpleFunction('flash', [$this, 'getMessages']),
- ];
- }
-
- /**
- * Returns Flash messages; If key is provided then returns messages
- * for that key.
- *
- * @param string $key
- *
- * @return array
- */
- public function getMessages($key = null)
- {
- if (null !== $key) {
- return $this->flash->getMessage($key);
- }
-
- return $this->flash->getMessages();
- }
-}
diff --git a/vendor/monolog/monolog/CHANGELOG.md b/vendor/monolog/monolog/CHANGELOG.md
index a00c1ec..a92155e 100644
--- a/vendor/monolog/monolog/CHANGELOG.md
+++ b/vendor/monolog/monolog/CHANGELOG.md
@@ -1,3 +1,38 @@
+### 1.27.1 (2022-06-09)
+
+ * Fixed MandrillHandler support for SwiftMailer 6 (#1676)
+ * Fixed StreamHandler chunk size (backport from #1552)
+
+### 1.27.0 (2022-03-13)
+
+ * Added $maxDepth / setMaxDepth to NormalizerFormatter / JsonFormatter to configure the maximum depth if the default of 9 does not work for you (#1633)
+
+### 1.26.1 (2021-05-28)
+
+ * Fixed PHP 8.1 deprecation warning
+
+### 1.26.0 (2020-12-14)
+
+ * Added $dateFormat and $removeUsedContextFields arguments to PsrLogMessageProcessor (backport from 2.x)
+
+### 1.25.5 (2020-07-23)
+
+ * Fixed array access on null in RavenHandler
+ * Fixed unique_id in WebProcessor not being disableable
+
+### 1.25.4 (2020-05-22)
+
+ * Fixed GitProcessor type error when there is no git repo present
+ * Fixed normalization of SoapFault objects containing deeply nested objects as "detail"
+ * Fixed support for relative paths in RotatingFileHandler
+
+### 1.25.3 (2019-12-20)
+
+ * Fixed formatting of resources in JsonFormatter
+ * Fixed RedisHandler failing to use MULTI properly when passed a proxied Redis instance (e.g. in Symfony with lazy services)
+ * Fixed FilterHandler triggering a notice when handleBatch was filtering all records passed to it
+ * Fixed Turkish locale messing up the conversion of level names to their constant values
+
### 1.25.2 (2019-11-13)
* Fixed normalization of Traversables to avoid traversing them as not all of them are rewindable
diff --git a/vendor/monolog/monolog/composer.json b/vendor/monolog/monolog/composer.json
index 097df87..aecc40f 100644
--- a/vendor/monolog/monolog/composer.json
+++ b/vendor/monolog/monolog/composer.json
@@ -26,10 +26,8 @@
"php-amqplib/php-amqplib": "~2.4",
"swiftmailer/swiftmailer": "^5.3|^6.0",
"php-console/php-console": "^3.1.3",
- "phpunit/phpunit-mock-objects": "2.3.0",
- "jakub-onderka/php-parallel-lint": "0.9"
+ "phpstan/phpstan": "^0.12.59"
},
- "_": "phpunit/phpunit-mock-objects required in 2.3.0 due to https://github.com/sebastianbergmann/phpunit-mock-objects/issues/223 - needs hhvm 3.8+ on travis",
"suggest": {
"graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
"sentry/sentry": "Allow sending log messages to a Sentry server",
@@ -52,15 +50,11 @@
"provide": {
"psr/log-implementation": "1.0.0"
},
- "extra": {
- "branch-alias": {
- "dev-master": "2.0.x-dev"
- }
- },
"scripts": {
- "test": [
- "parallel-lint . --exclude vendor --exclude src/Monolog/Handler/FormattableHandlerInterface.php --exclude src/Monolog/Handler/FormattableHandlerTrait.php --exclude src/Monolog/Handler/ProcessableHandlerInterface.php --exclude src/Monolog/Handler/ProcessableHandlerTrait.php",
- "phpunit"
- ]
+ "test": "vendor/bin/phpunit",
+ "phpstan": "vendor/bin/phpstan analyse"
+ },
+ "config": {
+ "lock": false
}
}
diff --git a/vendor/monolog/monolog/src/Monolog/ErrorHandler.php b/vendor/monolog/monolog/src/Monolog/ErrorHandler.php
index adc55bd..5121c2c 100644
--- a/vendor/monolog/monolog/src/Monolog/ErrorHandler.php
+++ b/vendor/monolog/monolog/src/Monolog/ErrorHandler.php
@@ -14,7 +14,6 @@ namespace Monolog;
use Psr\Log\LoggerInterface;
use Psr\Log\LogLevel;
use Monolog\Handler\AbstractHandler;
-use Monolog\Registry;
/**
* Monolog error handler
@@ -63,6 +62,7 @@ class ErrorHandler
//Forces the autoloader to run for LogLevel. Fixes an autoload issue at compile-time on PHP5.3. See https://github.com/Seldaek/monolog/pull/929
class_exists('\\Psr\\Log\\LogLevel', true);
+ /** @phpstan-ignore-next-line */
$handler = new static($logger);
if ($errorLevelMap !== false) {
$handler->registerErrorHandler($errorLevelMap);
diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php
index 96a0591..4c5422d 100644
--- a/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php
+++ b/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php
@@ -38,9 +38,11 @@ class JsonFormatter extends NormalizerFormatter
/**
* @param int $batchMode
* @param bool $appendNewline
+ * @param int $maxDepth
*/
- public function __construct($batchMode = self::BATCH_MODE_JSON, $appendNewline = true)
+ public function __construct($batchMode = self::BATCH_MODE_JSON, $appendNewline = true, $maxDepth = 9)
{
+ parent::__construct(null, $maxDepth);
$this->batchMode = $batchMode;
$this->appendNewline = $appendNewline;
}
@@ -141,8 +143,8 @@ class JsonFormatter extends NormalizerFormatter
*/
protected function normalize($data, $depth = 0)
{
- if ($depth > 9) {
- return 'Over 9 levels deep, aborting normalization';
+ if ($depth > $this->maxDepth) {
+ return 'Over '.$this->maxDepth.' levels deep, aborting normalization';
}
if (is_array($data)) {
@@ -165,6 +167,10 @@ class JsonFormatter extends NormalizerFormatter
return $this->normalizeException($data);
}
+ if (is_resource($data)) {
+ return parent::normalize($data);
+ }
+
return $data;
}
diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php
index 61861c8..010466b 100644
--- a/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php
+++ b/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php
@@ -24,13 +24,16 @@ class NormalizerFormatter implements FormatterInterface
const SIMPLE_DATE = "Y-m-d H:i:s";
protected $dateFormat;
+ protected $maxDepth;
/**
* @param string $dateFormat The format of the timestamp: one supported by DateTime::format
+ * @param int $maxDepth
*/
- public function __construct($dateFormat = null)
+ public function __construct($dateFormat = null, $maxDepth = 9)
{
$this->dateFormat = $dateFormat ?: static::SIMPLE_DATE;
+ $this->maxDepth = $maxDepth;
if (!function_exists('json_encode')) {
throw new \RuntimeException('PHP\'s json extension is required to use Monolog\'s NormalizerFormatter');
}
@@ -56,10 +59,26 @@ class NormalizerFormatter implements FormatterInterface
return $records;
}
+ /**
+ * @return int
+ */
+ public function getMaxDepth()
+ {
+ return $this->maxDepth;
+ }
+
+ /**
+ * @param int $maxDepth
+ */
+ public function setMaxDepth($maxDepth)
+ {
+ $this->maxDepth = $maxDepth;
+ }
+
protected function normalize($data, $depth = 0)
{
- if ($depth > 9) {
- return 'Over 9 levels deep, aborting normalization';
+ if ($depth > $this->maxDepth) {
+ return 'Over '.$this->maxDepth.' levels deep, aborting normalization';
}
if (null === $data || is_scalar($data)) {
@@ -142,8 +161,12 @@ class NormalizerFormatter implements FormatterInterface
$data['faultactor'] = $e->faultactor;
}
- if (isset($e->detail) && (is_string($e->detail) || is_object($e->detail) || is_array($e->detail))) {
- $data['detail'] = is_string($e->detail) ? $e->detail : reset($e->detail);
+ if (isset($e->detail)) {
+ if (is_string($e->detail)) {
+ $data['detail'] = $e->detail;
+ } elseif (is_object($e->detail) || is_array($e->detail)) {
+ $data['detail'] = $this->toJson($e->detail, true);
+ }
}
}
@@ -173,4 +196,4 @@ class NormalizerFormatter implements FormatterInterface
{
return Utils::jsonEncode($data, null, $ignoreErrors);
}
-}
+}
\ No newline at end of file
diff --git a/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php
index 92b9d45..cdd9f7d 100644
--- a/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php
+++ b/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php
@@ -33,8 +33,8 @@ abstract class AbstractHandler implements HandlerInterface, ResettableInterface
protected $processors = array();
/**
- * @param int $level The minimum logging level at which this handler will be triggered
- * @param bool $bubble Whether the messages that are handled can bubble up the stack or not
+ * @param int|string $level The minimum logging level at which this handler will be triggered
+ * @param bool $bubble Whether the messages that are handled can bubble up the stack or not
*/
public function __construct($level = Logger::DEBUG, $bubble = true)
{
diff --git a/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php
index 237b71f..8846e0a 100644
--- a/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php
+++ b/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php
@@ -77,6 +77,7 @@ class DynamoDbHandler extends AbstractProcessingHandler
if ($this->version === 3) {
$formatted = $this->marshaler->marshalItem($filtered);
} else {
+ /** @phpstan-ignore-next-line */
$formatted = $this->client->formatAttributes($filtered);
}
diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php
index 11ede52..949f227 100644
--- a/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php
+++ b/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php
@@ -128,7 +128,9 @@ class FilterHandler extends AbstractHandler
}
}
- $this->getHandler($filtered[count($filtered) - 1])->handleBatch($filtered);
+ if (count($filtered) > 0) {
+ $this->getHandler($filtered[count($filtered) - 1])->handleBatch($filtered);
+ }
}
/**
diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php
index c30b184..2a171bd 100644
--- a/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php
+++ b/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php
@@ -72,7 +72,7 @@ class FirePHPHandler extends AbstractProcessingHandler
*
* @see createHeader()
* @param array $record
- * @return string
+ * @return array
*/
protected function createRecordHeader(array $record)
{
diff --git a/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php
index 71e4669..b6cde7c 100644
--- a/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php
+++ b/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php
@@ -27,7 +27,7 @@ use Monolog\Formatter\GelfMessageFormatter;
class GelfHandler extends AbstractProcessingHandler
{
/**
- * @var Publisher the publisher object that sends the message to the server
+ * @var Publisher|PublisherInterface|IMessagePublisher the publisher object that sends the message to the server
*/
protected $publisher;
diff --git a/vendor/monolog/monolog/src/Monolog/Handler/HipChatHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/HipChatHandler.php
index 179d626..30258e3 100644
--- a/vendor/monolog/monolog/src/Monolog/Handler/HipChatHandler.php
+++ b/vendor/monolog/monolog/src/Monolog/Handler/HipChatHandler.php
@@ -270,10 +270,10 @@ class HipChatHandler extends SocketHandler
* will be the highest level from the given records. Datetime will be taken
* from the first record.
*
- * @param $records
+ * @param array $records
* @return array
*/
- private function combineRecords($records)
+ private function combineRecords(array $records)
{
$batchRecord = null;
$batchRecords = array();
diff --git a/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php
index 3f0956a..de039a8 100644
--- a/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php
+++ b/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php
@@ -50,7 +50,11 @@ class MandrillHandler extends MailHandler
{
$message = clone $this->message;
$message->setBody($content);
- $message->setDate(time());
+ if (version_compare(\Swift::VERSION, '6.0.0', '>=')) {
+ $message->setDate(new \DateTimeImmutable());
+ } else {
+ $message->setDate(time());
+ }
$ch = curl_init();
diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RavenHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RavenHandler.php
index 1929f25..b0298fa 100644
--- a/vendor/monolog/monolog/src/Monolog/Handler/RavenHandler.php
+++ b/vendor/monolog/monolog/src/Monolog/Handler/RavenHandler.php
@@ -50,7 +50,7 @@ class RavenHandler extends AbstractProcessingHandler
protected $ravenClient;
/**
- * @var LineFormatter The formatter to use for the logs generated via handleBatch()
+ * @var FormatterInterface The formatter to use for the logs generated via handleBatch()
*/
protected $batchFormatter;
@@ -86,7 +86,7 @@ class RavenHandler extends AbstractProcessingHandler
// the record with the highest severity is the "main" one
$record = array_reduce($records, function ($highest, $record) {
- if ($record['level'] > $highest['level']) {
+ if (null === $highest || $record['level'] > $highest['level']) {
return $record;
}
diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php
index 590f996..3725db2 100644
--- a/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php
+++ b/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php
@@ -36,7 +36,7 @@ class RedisHandler extends AbstractProcessingHandler
* @param string $key The key name to push records to
* @param int $level The minimum logging level at which this handler will be triggered
* @param bool $bubble Whether the messages that are handled can bubble up the stack or not
- * @param int $capSize Number of entries to limit list size to
+ * @param int|false $capSize Number of entries to limit list size to
*/
public function __construct($redis, $key, $level = Logger::DEBUG, $bubble = true, $capSize = false)
{
@@ -73,7 +73,8 @@ class RedisHandler extends AbstractProcessingHandler
protected function writeCapped(array $record)
{
if ($this->redisClient instanceof \Redis) {
- $this->redisClient->multi()
+ $mode = defined('\Redis::MULTI') ? \Redis::MULTI : 1;
+ $this->redisClient->multi($mode)
->rpush($this->redisKey, $record["formatted"])
->ltrim($this->redisKey, -$this->capSize, -1)
->exec();
diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php
index ae2309f..b8253ba 100644
--- a/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php
+++ b/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php
@@ -12,6 +12,7 @@
namespace Monolog\Handler;
use Monolog\Logger;
+use Monolog\Utils;
/**
* Stores logs to files that are rotated every day and a limited number of files are kept.
@@ -45,7 +46,7 @@ class RotatingFileHandler extends StreamHandler
*/
public function __construct($filename, $maxFiles = 0, $level = Logger::DEBUG, $bubble = true, $filePermission = null, $useLocking = false)
{
- $this->filename = $filename;
+ $this->filename = Utils::canonicalizePath($filename);
$this->maxFiles = (int) $maxFiles;
$this->nextRotation = new \DateTime('tomorrow');
$this->filenameFormat = '{filename}-{date}';
diff --git a/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php
index 27d90e0..74a613c 100644
--- a/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php
+++ b/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php
@@ -12,6 +12,7 @@
namespace Monolog\Handler;
use Monolog\Logger;
+use Monolog\Utils;
/**
* Stores to any stream resource
@@ -22,6 +23,10 @@ use Monolog\Logger;
*/
class StreamHandler extends AbstractProcessingHandler
{
+ /** @private 512KB */
+ const CHUNK_SIZE = 524288;
+
+ /** @var resource|null */
protected $stream;
protected $url;
private $errorMessage;
@@ -44,8 +49,9 @@ class StreamHandler extends AbstractProcessingHandler
parent::__construct($level, $bubble);
if (is_resource($stream)) {
$this->stream = $stream;
+ $this->streamSetChunkSize();
} elseif (is_string($stream)) {
- $this->url = $stream;
+ $this->url = Utils::canonicalizePath($stream);
} else {
throw new \InvalidArgumentException('A stream must either be a resource or a string.');
}
@@ -105,8 +111,10 @@ class StreamHandler extends AbstractProcessingHandler
restore_error_handler();
if (!is_resource($this->stream)) {
$this->stream = null;
- throw new \UnexpectedValueException(sprintf('The stream or file "%s" could not be opened: '.$this->errorMessage, $this->url));
+
+ throw new \UnexpectedValueException(sprintf('The stream or file "%s" could not be opened in append mode: '.$this->errorMessage, $this->url));
}
+ $this->streamSetChunkSize();
}
if ($this->useLocking) {
@@ -131,6 +139,15 @@ class StreamHandler extends AbstractProcessingHandler
fwrite($stream, (string) $record['formatted']);
}
+ protected function streamSetChunkSize()
+ {
+ if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
+ return stream_set_chunk_size($this->stream, self::CHUNK_SIZE);
+ }
+
+ return false;
+ }
+
private function customErrorHandler($code, $msg)
{
$this->errorMessage = preg_replace('{^(fopen|mkdir)\(.*?\): }', '', $msg);
@@ -152,7 +169,7 @@ class StreamHandler extends AbstractProcessingHandler
return dirname(substr($stream, 7));
}
- return;
+ return null;
}
private function createDir()
diff --git a/vendor/monolog/monolog/src/Monolog/Logger.php b/vendor/monolog/monolog/src/Monolog/Logger.php
index 05dfc81..7d26b29 100644
--- a/vendor/monolog/monolog/src/Monolog/Logger.php
+++ b/vendor/monolog/monolog/src/Monolog/Logger.php
@@ -321,7 +321,7 @@ class Logger implements LoggerInterface, ResettableInterface
if ($this->microsecondTimestamps && PHP_VERSION_ID < 70100) {
$ts = \DateTime::createFromFormat('U.u', sprintf('%.6F', microtime(true)), static::$timezone);
} else {
- $ts = new \DateTime(null, static::$timezone);
+ $ts = new \DateTime('now', static::$timezone);
}
$ts->setTimezone(static::$timezone);
@@ -522,13 +522,18 @@ class Logger implements LoggerInterface, ResettableInterface
/**
* Converts PSR-3 levels to Monolog ones if necessary
*
- * @param string|int Level number (monolog) or name (PSR-3)
+ * @param string|int $level Level number (monolog) or name (PSR-3)
* @return int
*/
public static function toMonologLevel($level)
{
- if (is_string($level) && defined(__CLASS__.'::'.strtoupper($level))) {
- return constant(__CLASS__.'::'.strtoupper($level));
+ if (is_string($level)) {
+ // Contains chars of all log levels and avoids using strtoupper() which may have
+ // strange results depending on locale (for example, "i" will become "İ")
+ $upper = strtr($level, 'abcdefgilmnortuwy', 'ABCDEFGILMNORTUWY');
+ if (defined(__CLASS__.'::'.$upper)) {
+ return constant(__CLASS__ . '::' . $upper);
+ }
}
return $level;
diff --git a/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php
index 9fc3f50..cdf5ec7 100644
--- a/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php
+++ b/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php
@@ -52,7 +52,7 @@ class GitProcessor implements ProcessorInterface
}
$branches = `git branch -v --no-abbrev`;
- if (preg_match('{^\* (.+?)\s+([a-f0-9]{40})(?:\s|$)}m', $branches, $matches)) {
+ if ($branches && preg_match('{^\* (.+?)\s+([a-f0-9]{40})(?:\s|$)}m', $branches, $matches)) {
return self::$cache = array(
'branch' => $matches[1],
'commit' => $matches[2],
diff --git a/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php
index 0088505..a318af7 100644
--- a/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php
+++ b/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php
@@ -22,6 +22,24 @@ use Monolog\Utils;
*/
class PsrLogMessageProcessor implements ProcessorInterface
{
+ const SIMPLE_DATE = "Y-m-d\TH:i:s.uP";
+
+ /** @var string|null */
+ private $dateFormat;
+
+ /** @var bool */
+ private $removeUsedContextFields;
+
+ /**
+ * @param string|null $dateFormat The format of the timestamp: one supported by DateTime::format
+ * @param bool $removeUsedContextFields If set to true the fields interpolated into message gets unset
+ */
+ public function __construct($dateFormat = null, $removeUsedContextFields = false)
+ {
+ $this->dateFormat = $dateFormat;
+ $this->removeUsedContextFields = $removeUsedContextFields;
+ }
+
/**
* @param array $record
* @return array
@@ -34,12 +52,25 @@ class PsrLogMessageProcessor implements ProcessorInterface
$replacements = array();
foreach ($record['context'] as $key => $val) {
+ $placeholder = '{' . $key . '}';
+ if (strpos($record['message'], $placeholder) === false) {
+ continue;
+ }
+
if (is_null($val) || is_scalar($val) || (is_object($val) && method_exists($val, "__toString"))) {
- $replacements['{'.$key.'}'] = $val;
+ $replacements[$placeholder] = $val;
+ } elseif ($val instanceof \DateTime) {
+ $replacements[$placeholder] = $val->format($this->dateFormat ?: static::SIMPLE_DATE);
} elseif (is_object($val)) {
- $replacements['{'.$key.'}'] = '[object '.Utils::getClass($val).']';
+ $replacements[$placeholder] = '[object '.Utils::getClass($val).']';
+ } elseif (is_array($val)) {
+ $replacements[$placeholder] = 'array'.Utils::jsonEncode($val, null, true);
} else {
- $replacements['{'.$key.'}'] = '['.gettype($val).']';
+ $replacements[$placeholder] = '['.gettype($val).']';
+ }
+
+ if ($this->removeUsedContextFields) {
+ unset($record['context'][$key]);
}
}
diff --git a/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php
index 684188f..2e8dfae 100644
--- a/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php
+++ b/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php
@@ -52,6 +52,10 @@ class WebProcessor implements ProcessorInterface
throw new \UnexpectedValueException('$serverData must be an array or object implementing ArrayAccess.');
}
+ if (isset($this->serverData['UNIQUE_ID'])) {
+ $this->extraFields['unique_id'] = 'UNIQUE_ID';
+ }
+
if (null !== $extraFields) {
if (isset($extraFields[0])) {
foreach (array_keys($this->extraFields) as $fieldName) {
@@ -104,10 +108,6 @@ class WebProcessor implements ProcessorInterface
$extra[$extraName] = isset($this->serverData[$serverName]) ? $this->serverData[$serverName] : null;
}
- if (isset($this->serverData['UNIQUE_ID'])) {
- $extra['unique_id'] = $this->serverData['UNIQUE_ID'];
- }
-
return $extra;
}
}
diff --git a/vendor/monolog/monolog/src/Monolog/Utils.php b/vendor/monolog/monolog/src/Monolog/Utils.php
index 180a159..7f1ba12 100644
--- a/vendor/monolog/monolog/src/Monolog/Utils.php
+++ b/vendor/monolog/monolog/src/Monolog/Utils.php
@@ -23,6 +23,36 @@ class Utils
return 'c' === $class[0] && 0 === strpos($class, "class@anonymous\0") ? get_parent_class($class).'@anonymous' : $class;
}
+ /**
+ * Makes sure if a relative path is passed in it is turned into an absolute path
+ *
+ * @param string $streamUrl stream URL or path without protocol
+ *
+ * @return string
+ */
+ public static function canonicalizePath($streamUrl)
+ {
+ $prefix = '';
+ if ('file://' === substr($streamUrl, 0, 7)) {
+ $streamUrl = substr($streamUrl, 7);
+ $prefix = 'file://';
+ }
+
+ // other type of stream, not supported
+ if (false !== strpos($streamUrl, '://')) {
+ return $streamUrl;
+ }
+
+ // already absolute
+ if (substr($streamUrl, 0, 1) === '/' || substr($streamUrl, 1, 1) === ':' || substr($streamUrl, 0, 2) === '\\\\') {
+ return $prefix.$streamUrl;
+ }
+
+ $streamUrl = getcwd() . '/' . $streamUrl;
+
+ return $prefix.$streamUrl;
+ }
+
/**
* Return the JSON representation of a value
*
@@ -138,7 +168,7 @@ class Utils
* Function converts the input in place in the passed variable so that it
* can be used as a callback for array_walk_recursive.
*
- * @param mixed &$data Input to check and convert if needed
+ * @param mixed $data Input to check and convert if needed, passed by ref
* @private
*/
public static function detectAndCleanUtf8(&$data)
diff --git a/vendor/myclabs/deep-copy/LICENSE b/vendor/myclabs/deep-copy/LICENSE
deleted file mode 100644
index c3e8350..0000000
--- a/vendor/myclabs/deep-copy/LICENSE
+++ /dev/null
@@ -1,20 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2013 My C-Sense
-
-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.
diff --git a/vendor/myclabs/deep-copy/README.md b/vendor/myclabs/deep-copy/README.md
deleted file mode 100644
index 7abe5dc..0000000
--- a/vendor/myclabs/deep-copy/README.md
+++ /dev/null
@@ -1,376 +0,0 @@
-# DeepCopy
-
-DeepCopy helps you create deep copies (clones) of your objects. It is designed to handle cycles in the association graph.
-
-[](https://travis-ci.org/myclabs/DeepCopy)
-[](https://coveralls.io/r/myclabs/DeepCopy?branch=1.x)
-[](https://scrutinizer-ci.com/g/myclabs/DeepCopy/)
-[](https://packagist.org/packages/myclabs/deep-copy)
-
-
-**You are browsing the 1.x version, this version is in maintenance mode only. Please check the new
-[2.x](https://github.com/myclabs/DeepCopy/tree/2.x) version.**
-
-
-## Table of Contents
-
-1. [How](#how)
-1. [Why](#why)
- 1. [Using simply `clone`](#using-simply-clone)
- 1. [Overridding `__clone()`](#overridding-__clone)
- 1. [With `DeepCopy`](#with-deepcopy)
-1. [How it works](#how-it-works)
-1. [Going further](#going-further)
- 1. [Matchers](#matchers)
- 1. [Property name](#property-name)
- 1. [Specific property](#specific-property)
- 1. [Type](#type)
- 1. [Filters](#filters)
- 1. [`SetNullFilter`](#setnullfilter-filter)
- 1. [`KeepFilter`](#keepfilter-filter)
- 1. [`DoctrineCollectionFilter`](#doctrinecollectionfilter-filter)
- 1. [`DoctrineEmptyCollectionFilter`](#doctrineemptycollectionfilter-filter)
- 1. [`DoctrineProxyFilter`](#doctrineproxyfilter-filter)
- 1. [`ReplaceFilter`](#replacefilter-type-filter)
- 1. [`ShallowCopyFilter`](#shallowcopyfilter-type-filter)
-1. [Edge cases](#edge-cases)
-1. [Contributing](#contributing)
- 1. [Tests](#tests)
-
-
-## How?
-
-Install with Composer:
-
-```json
-composer require myclabs/deep-copy
-```
-
-Use simply:
-
-```php
-use DeepCopy\DeepCopy;
-
-$copier = new DeepCopy();
-$myCopy = $copier->copy($myObject);
-```
-
-
-## Why?
-
-- How do you create copies of your objects?
-
-```php
-$myCopy = clone $myObject;
-```
-
-- How do you create **deep** copies of your objects (i.e. copying also all the objects referenced in the properties)?
-
-You use [`__clone()`](http://www.php.net/manual/en/language.oop5.cloning.php#object.clone) and implement the behavior
-yourself.
-
-- But how do you handle **cycles** in the association graph?
-
-Now you're in for a big mess :(
-
-
-
-
-### Using simply `clone`
-
-
-
-
-### Overridding `__clone()`
-
-
-
-
-### With `DeepCopy`
-
-
-
-
-## How it works
-
-DeepCopy recursively traverses all the object's properties and clones them. To avoid cloning the same object twice it
-keeps a hash map of all instances and thus preserves the object graph.
-
-To use it:
-
-```php
-use function DeepCopy\deep_copy;
-
-$copy = deep_copy($var);
-```
-
-Alternatively, you can create your own `DeepCopy` instance to configure it differently for example:
-
-```php
-use DeepCopy\DeepCopy;
-
-$copier = new DeepCopy(true);
-
-$copy = $copier->copy($var);
-```
-
-You may want to roll your own deep copy function:
-
-```php
-namespace Acme;
-
-use DeepCopy\DeepCopy;
-
-function deep_copy($var)
-{
- static $copier = null;
-
- if (null === $copier) {
- $copier = new DeepCopy(true);
- }
-
- return $copier->copy($var);
-}
-```
-
-
-## Going further
-
-You can add filters to customize the copy process.
-
-The method to add a filter is `DeepCopy\DeepCopy::addFilter($filter, $matcher)`,
-with `$filter` implementing `DeepCopy\Filter\Filter`
-and `$matcher` implementing `DeepCopy\Matcher\Matcher`.
-
-We provide some generic filters and matchers.
-
-
-### Matchers
-
- - `DeepCopy\Matcher` applies on a object attribute.
- - `DeepCopy\TypeMatcher` applies on any element found in graph, including array elements.
-
-
-#### Property name
-
-The `PropertyNameMatcher` will match a property by its name:
-
-```php
-use DeepCopy\Matcher\PropertyNameMatcher;
-
-// Will apply a filter to any property of any objects named "id"
-$matcher = new PropertyNameMatcher('id');
-```
-
-
-#### Specific property
-
-The `PropertyMatcher` will match a specific property of a specific class:
-
-```php
-use DeepCopy\Matcher\PropertyMatcher;
-
-// Will apply a filter to the property "id" of any objects of the class "MyClass"
-$matcher = new PropertyMatcher('MyClass', 'id');
-```
-
-
-#### Type
-
-The `TypeMatcher` will match any element by its type (instance of a class or any value that could be parameter of
-[gettype()](http://php.net/manual/en/function.gettype.php) function):
-
-```php
-use DeepCopy\TypeMatcher\TypeMatcher;
-
-// Will apply a filter to any object that is an instance of Doctrine\Common\Collections\Collection
-$matcher = new TypeMatcher('Doctrine\Common\Collections\Collection');
-```
-
-
-### Filters
-
-- `DeepCopy\Filter` applies a transformation to the object attribute matched by `DeepCopy\Matcher`
-- `DeepCopy\TypeFilter` applies a transformation to any element matched by `DeepCopy\TypeMatcher`
-
-
-#### `SetNullFilter` (filter)
-
-Let's say for example that you are copying a database record (or a Doctrine entity), so you want the copy not to have
-any ID:
-
-```php
-use DeepCopy\DeepCopy;
-use DeepCopy\Filter\SetNullFilter;
-use DeepCopy\Matcher\PropertyNameMatcher;
-
-$object = MyClass::load(123);
-echo $object->id; // 123
-
-$copier = new DeepCopy();
-$copier->addFilter(new SetNullFilter(), new PropertyNameMatcher('id'));
-
-$copy = $copier->copy($object);
-
-echo $copy->id; // null
-```
-
-
-#### `KeepFilter` (filter)
-
-If you want a property to remain untouched (for example, an association to an object):
-
-```php
-use DeepCopy\DeepCopy;
-use DeepCopy\Filter\KeepFilter;
-use DeepCopy\Matcher\PropertyMatcher;
-
-$copier = new DeepCopy();
-$copier->addFilter(new KeepFilter(), new PropertyMatcher('MyClass', 'category'));
-
-$copy = $copier->copy($object);
-// $copy->category has not been touched
-```
-
-
-#### `DoctrineCollectionFilter` (filter)
-
-If you use Doctrine and want to copy an entity, you will need to use the `DoctrineCollectionFilter`:
-
-```php
-use DeepCopy\DeepCopy;
-use DeepCopy\Filter\Doctrine\DoctrineCollectionFilter;
-use DeepCopy\Matcher\PropertyTypeMatcher;
-
-$copier = new DeepCopy();
-$copier->addFilter(new DoctrineCollectionFilter(), new PropertyTypeMatcher('Doctrine\Common\Collections\Collection'));
-
-$copy = $copier->copy($object);
-```
-
-
-#### `DoctrineEmptyCollectionFilter` (filter)
-
-If you use Doctrine and want to copy an entity who contains a `Collection` that you want to be reset, you can use the
-`DoctrineEmptyCollectionFilter`
-
-```php
-use DeepCopy\DeepCopy;
-use DeepCopy\Filter\Doctrine\DoctrineEmptyCollectionFilter;
-use DeepCopy\Matcher\PropertyMatcher;
-
-$copier = new DeepCopy();
-$copier->addFilter(new DoctrineEmptyCollectionFilter(), new PropertyMatcher('MyClass', 'myProperty'));
-
-$copy = $copier->copy($object);
-
-// $copy->myProperty will return an empty collection
-```
-
-
-#### `DoctrineProxyFilter` (filter)
-
-If you use Doctrine and use cloning on lazy loaded entities, you might encounter errors mentioning missing fields on a
-Doctrine proxy class (...\\\_\_CG\_\_\Proxy).
-You can use the `DoctrineProxyFilter` to load the actual entity behind the Doctrine proxy class.
-**Make sure, though, to put this as one of your very first filters in the filter chain so that the entity is loaded
-before other filters are applied!**
-
-```php
-use DeepCopy\DeepCopy;
-use DeepCopy\Filter\Doctrine\DoctrineProxyFilter;
-use DeepCopy\Matcher\Doctrine\DoctrineProxyMatcher;
-
-$copier = new DeepCopy();
-$copier->addFilter(new DoctrineProxyFilter(), new DoctrineProxyMatcher());
-
-$copy = $copier->copy($object);
-
-// $copy should now contain a clone of all entities, including those that were not yet fully loaded.
-```
-
-
-#### `ReplaceFilter` (type filter)
-
-1. If you want to replace the value of a property:
-
-```php
-use DeepCopy\DeepCopy;
-use DeepCopy\Filter\ReplaceFilter;
-use DeepCopy\Matcher\PropertyMatcher;
-
-$copier = new DeepCopy();
-$callback = function ($currentValue) {
- return $currentValue . ' (copy)'
-};
-$copier->addFilter(new ReplaceFilter($callback), new PropertyMatcher('MyClass', 'title'));
-
-$copy = $copier->copy($object);
-
-// $copy->title will contain the data returned by the callback, e.g. 'The title (copy)'
-```
-
-2. If you want to replace whole element:
-
-```php
-use DeepCopy\DeepCopy;
-use DeepCopy\TypeFilter\ReplaceFilter;
-use DeepCopy\TypeMatcher\TypeMatcher;
-
-$copier = new DeepCopy();
-$callback = function (MyClass $myClass) {
- return get_class($myClass);
-};
-$copier->addTypeFilter(new ReplaceFilter($callback), new TypeMatcher('MyClass'));
-
-$copy = $copier->copy([new MyClass, 'some string', new MyClass]);
-
-// $copy will contain ['MyClass', 'some string', 'MyClass']
-```
-
-
-The `$callback` parameter of the `ReplaceFilter` constructor accepts any PHP callable.
-
-
-#### `ShallowCopyFilter` (type filter)
-
-Stop *DeepCopy* from recursively copying element, using standard `clone` instead:
-
-```php
-use DeepCopy\DeepCopy;
-use DeepCopy\TypeFilter\ShallowCopyFilter;
-use DeepCopy\TypeMatcher\TypeMatcher;
-use Mockery as m;
-
-$this->deepCopy = new DeepCopy();
-$this->deepCopy->addTypeFilter(
- new ShallowCopyFilter,
- new TypeMatcher(m\MockInterface::class)
-);
-
-$myServiceWithMocks = new MyService(m::mock(MyDependency1::class), m::mock(MyDependency2::class));
-// All mocks will be just cloned, not deep copied
-```
-
-
-## Edge cases
-
-The following structures cannot be deep-copied with PHP Reflection. As a result they are shallow cloned and filters are
-not applied. There is two ways for you to handle them:
-
-- Implement your own `__clone()` method
-- Use a filter with a type matcher
-
-
-## Contributing
-
-DeepCopy is distributed under the MIT license.
-
-
-### Tests
-
-Running the tests is simple:
-
-```php
-vendor/bin/phpunit
-```
diff --git a/vendor/myclabs/deep-copy/composer.json b/vendor/myclabs/deep-copy/composer.json
deleted file mode 100644
index 4108a23..0000000
--- a/vendor/myclabs/deep-copy/composer.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "name": "myclabs/deep-copy",
- "type": "library",
- "description": "Create deep copies (clones) of your objects",
- "keywords": ["clone", "copy", "duplicate", "object", "object graph"],
- "license": "MIT",
-
- "autoload": {
- "psr-4": {
- "DeepCopy\\": "src/DeepCopy/"
- },
- "files": [
- "src/DeepCopy/deep_copy.php"
- ]
- },
- "autoload-dev": {
- "psr-4": {
- "DeepCopy\\": "fixtures/",
- "DeepCopyTest\\": "tests/DeepCopyTest/"
- }
- },
-
- "require": {
- "php": "^7.1"
- },
- "require-dev": {
- "doctrine/collections": "^1.0",
- "doctrine/common": "^2.6",
- "phpunit/phpunit": "^7.1"
- },
- "replace": {
- "myclabs/deep-copy": "self.version"
- },
-
- "config": {
- "sort-packages": true
- }
-}
diff --git a/vendor/myclabs/deep-copy/doc/clone.png b/vendor/myclabs/deep-copy/doc/clone.png
deleted file mode 100644
index 376afd4..0000000
Binary files a/vendor/myclabs/deep-copy/doc/clone.png and /dev/null differ
diff --git a/vendor/myclabs/deep-copy/doc/deep-clone.png b/vendor/myclabs/deep-copy/doc/deep-clone.png
deleted file mode 100644
index 2b37a6d..0000000
Binary files a/vendor/myclabs/deep-copy/doc/deep-clone.png and /dev/null differ
diff --git a/vendor/myclabs/deep-copy/doc/deep-copy.png b/vendor/myclabs/deep-copy/doc/deep-copy.png
deleted file mode 100644
index 68c508a..0000000
Binary files a/vendor/myclabs/deep-copy/doc/deep-copy.png and /dev/null differ
diff --git a/vendor/myclabs/deep-copy/doc/graph.png b/vendor/myclabs/deep-copy/doc/graph.png
deleted file mode 100644
index 4d5c942..0000000
Binary files a/vendor/myclabs/deep-copy/doc/graph.png and /dev/null differ
diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php b/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php
deleted file mode 100644
index 2e53cf3..0000000
--- a/vendor/myclabs/deep-copy/src/DeepCopy/DeepCopy.php
+++ /dev/null
@@ -1,289 +0,0 @@
- Filter, 'matcher' => Matcher] pairs.
- */
- private $filters = [];
-
- /**
- * Type Filters to apply.
- *
- * @var array Array of ['filter' => Filter, 'matcher' => Matcher] pairs.
- */
- private $typeFilters = [];
-
- /**
- * @var bool
- */
- private $skipUncloneable = false;
-
- /**
- * @var bool
- */
- private $useCloneMethod;
-
- /**
- * @param bool $useCloneMethod If set to true, when an object implements the __clone() function, it will be used
- * instead of the regular deep cloning.
- */
- public function __construct($useCloneMethod = false)
- {
- $this->useCloneMethod = $useCloneMethod;
-
- $this->addTypeFilter(new DateIntervalFilter(), new TypeMatcher(DateInterval::class));
- $this->addTypeFilter(new SplDoublyLinkedListFilter($this), new TypeMatcher(SplDoublyLinkedList::class));
- }
-
- /**
- * If enabled, will not throw an exception when coming across an uncloneable property.
- *
- * @param $skipUncloneable
- *
- * @return $this
- */
- public function skipUncloneable($skipUncloneable = true)
- {
- $this->skipUncloneable = $skipUncloneable;
-
- return $this;
- }
-
- /**
- * Deep copies the given object.
- *
- * @param mixed $object
- *
- * @return mixed
- */
- public function copy($object)
- {
- $this->hashMap = [];
-
- return $this->recursiveCopy($object);
- }
-
- public function addFilter(Filter $filter, Matcher $matcher)
- {
- $this->filters[] = [
- 'matcher' => $matcher,
- 'filter' => $filter,
- ];
- }
-
- public function prependFilter(Filter $filter, Matcher $matcher)
- {
- array_unshift($this->filters, [
- 'matcher' => $matcher,
- 'filter' => $filter,
- ]);
- }
-
- public function addTypeFilter(TypeFilter $filter, TypeMatcher $matcher)
- {
- $this->typeFilters[] = [
- 'matcher' => $matcher,
- 'filter' => $filter,
- ];
- }
-
- private function recursiveCopy($var)
- {
- // Matches Type Filter
- if ($filter = $this->getFirstMatchedTypeFilter($this->typeFilters, $var)) {
- return $filter->apply($var);
- }
-
- // Resource
- if (is_resource($var)) {
- return $var;
- }
-
- // Array
- if (is_array($var)) {
- return $this->copyArray($var);
- }
-
- // Scalar
- if (! is_object($var)) {
- return $var;
- }
-
- // Object
- return $this->copyObject($var);
- }
-
- /**
- * Copy an array
- * @param array $array
- * @return array
- */
- private function copyArray(array $array)
- {
- foreach ($array as $key => $value) {
- $array[$key] = $this->recursiveCopy($value);
- }
-
- return $array;
- }
-
- /**
- * Copies an object.
- *
- * @param object $object
- *
- * @throws CloneException
- *
- * @return object
- */
- private function copyObject($object)
- {
- $objectHash = spl_object_hash($object);
-
- if (isset($this->hashMap[$objectHash])) {
- return $this->hashMap[$objectHash];
- }
-
- $reflectedObject = new ReflectionObject($object);
- $isCloneable = $reflectedObject->isCloneable();
-
- if (false === $isCloneable) {
- if ($this->skipUncloneable) {
- $this->hashMap[$objectHash] = $object;
-
- return $object;
- }
-
- throw new CloneException(
- sprintf(
- 'The class "%s" is not cloneable.',
- $reflectedObject->getName()
- )
- );
- }
-
- $newObject = clone $object;
- $this->hashMap[$objectHash] = $newObject;
-
- if ($this->useCloneMethod && $reflectedObject->hasMethod('__clone')) {
- return $newObject;
- }
-
- if ($newObject instanceof DateTimeInterface || $newObject instanceof DateTimeZone) {
- return $newObject;
- }
-
- foreach (ReflectionHelper::getProperties($reflectedObject) as $property) {
- $this->copyObjectProperty($newObject, $property);
- }
-
- return $newObject;
- }
-
- private function copyObjectProperty($object, ReflectionProperty $property)
- {
- // Ignore static properties
- if ($property->isStatic()) {
- return;
- }
-
- // Apply the filters
- foreach ($this->filters as $item) {
- /** @var Matcher $matcher */
- $matcher = $item['matcher'];
- /** @var Filter $filter */
- $filter = $item['filter'];
-
- if ($matcher->matches($object, $property->getName())) {
- $filter->apply(
- $object,
- $property->getName(),
- function ($object) {
- return $this->recursiveCopy($object);
- }
- );
-
- // If a filter matches, we stop processing this property
- return;
- }
- }
-
- $property->setAccessible(true);
- $propertyValue = $property->getValue($object);
-
- // Copy the property
- $property->setValue($object, $this->recursiveCopy($propertyValue));
- }
-
- /**
- * Returns first filter that matches variable, `null` if no such filter found.
- *
- * @param array $filterRecords Associative array with 2 members: 'filter' with value of type {@see TypeFilter} and
- * 'matcher' with value of type {@see TypeMatcher}
- * @param mixed $var
- *
- * @return TypeFilter|null
- */
- private function getFirstMatchedTypeFilter(array $filterRecords, $var)
- {
- $matched = $this->first(
- $filterRecords,
- function (array $record) use ($var) {
- /* @var TypeMatcher $matcher */
- $matcher = $record['matcher'];
-
- return $matcher->matches($var);
- }
- );
-
- return isset($matched) ? $matched['filter'] : null;
- }
-
- /**
- * Returns first element that matches predicate, `null` if no such element found.
- *
- * @param array $elements Array of ['filter' => Filter, 'matcher' => Matcher] pairs.
- * @param callable $predicate Predicate arguments are: element.
- *
- * @return array|null Associative array with 2 members: 'filter' with value of type {@see TypeFilter} and 'matcher'
- * with value of type {@see TypeMatcher} or `null`.
- */
- private function first(array $elements, callable $predicate)
- {
- foreach ($elements as $element) {
- if (call_user_func($predicate, $element)) {
- return $element;
- }
- }
-
- return null;
- }
-}
diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php b/vendor/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php
deleted file mode 100644
index c046706..0000000
--- a/vendor/myclabs/deep-copy/src/DeepCopy/Exception/CloneException.php
+++ /dev/null
@@ -1,9 +0,0 @@
-setAccessible(true);
- $oldCollection = $reflectionProperty->getValue($object);
-
- $newCollection = $oldCollection->map(
- function ($item) use ($objectCopier) {
- return $objectCopier($item);
- }
- );
-
- $reflectionProperty->setValue($object, $newCollection);
- }
-}
diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php
deleted file mode 100644
index 7b33fd5..0000000
--- a/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineEmptyCollectionFilter.php
+++ /dev/null
@@ -1,28 +0,0 @@
-setAccessible(true);
-
- $reflectionProperty->setValue($object, new ArrayCollection());
- }
-}
\ No newline at end of file
diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php
deleted file mode 100644
index 8bee8f7..0000000
--- a/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php
+++ /dev/null
@@ -1,22 +0,0 @@
-__load();
- }
-}
diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php b/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php
deleted file mode 100644
index 85ba18c..0000000
--- a/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Filter.php
+++ /dev/null
@@ -1,18 +0,0 @@
-callback = $callable;
- }
-
- /**
- * Replaces the object property by the result of the callback called with the object property.
- *
- * {@inheritdoc}
- */
- public function apply($object, $property, $objectCopier)
- {
- $reflectionProperty = ReflectionHelper::getProperty($object, $property);
- $reflectionProperty->setAccessible(true);
-
- $value = call_user_func($this->callback, $reflectionProperty->getValue($object));
-
- $reflectionProperty->setValue($object, $value);
- }
-}
diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php
deleted file mode 100644
index bea86b8..0000000
--- a/vendor/myclabs/deep-copy/src/DeepCopy/Filter/SetNullFilter.php
+++ /dev/null
@@ -1,24 +0,0 @@
-setAccessible(true);
- $reflectionProperty->setValue($object, null);
- }
-}
diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Doctrine/DoctrineProxyMatcher.php b/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Doctrine/DoctrineProxyMatcher.php
deleted file mode 100644
index ec8856f..0000000
--- a/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/Doctrine/DoctrineProxyMatcher.php
+++ /dev/null
@@ -1,22 +0,0 @@
-class = $class;
- $this->property = $property;
- }
-
- /**
- * Matches a specific property of a specific class.
- *
- * {@inheritdoc}
- */
- public function matches($object, $property)
- {
- return ($object instanceof $this->class) && $property == $this->property;
- }
-}
diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php b/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php
deleted file mode 100644
index c8ec0d2..0000000
--- a/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php
+++ /dev/null
@@ -1,32 +0,0 @@
-property = $property;
- }
-
- /**
- * Matches a property by its name.
- *
- * {@inheritdoc}
- */
- public function matches($object, $property)
- {
- return $property == $this->property;
- }
-}
diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php b/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php
deleted file mode 100644
index a6b0c0b..0000000
--- a/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php
+++ /dev/null
@@ -1,46 +0,0 @@
-propertyType = $propertyType;
- }
-
- /**
- * {@inheritdoc}
- */
- public function matches($object, $property)
- {
- try {
- $reflectionProperty = ReflectionHelper::getProperty($object, $property);
- } catch (ReflectionException $exception) {
- return false;
- }
-
- $reflectionProperty->setAccessible(true);
-
- return $reflectionProperty->getValue($object) instanceof $this->propertyType;
- }
-}
diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php b/vendor/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php
deleted file mode 100644
index 742410c..0000000
--- a/vendor/myclabs/deep-copy/src/DeepCopy/Reflection/ReflectionHelper.php
+++ /dev/null
@@ -1,78 +0,0 @@
-getProperties() does not return private properties from ancestor classes.
- *
- * @author muratyaman@gmail.com
- * @see http://php.net/manual/en/reflectionclass.getproperties.php
- *
- * @param ReflectionClass $ref
- *
- * @return ReflectionProperty[]
- */
- public static function getProperties(ReflectionClass $ref)
- {
- $props = $ref->getProperties();
- $propsArr = array();
-
- foreach ($props as $prop) {
- $propertyName = $prop->getName();
- $propsArr[$propertyName] = $prop;
- }
-
- if ($parentClass = $ref->getParentClass()) {
- $parentPropsArr = self::getProperties($parentClass);
- foreach ($propsArr as $key => $property) {
- $parentPropsArr[$key] = $property;
- }
-
- return $parentPropsArr;
- }
-
- return $propsArr;
- }
-
- /**
- * Retrieves property by name from object and all its ancestors.
- *
- * @param object|string $object
- * @param string $name
- *
- * @throws PropertyException
- * @throws ReflectionException
- *
- * @return ReflectionProperty
- */
- public static function getProperty($object, $name)
- {
- $reflection = is_object($object) ? new ReflectionObject($object) : new ReflectionClass($object);
-
- if ($reflection->hasProperty($name)) {
- return $reflection->getProperty($name);
- }
-
- if ($parentClass = $reflection->getParentClass()) {
- return self::getProperty($parentClass->getName(), $name);
- }
-
- throw new PropertyException(
- sprintf(
- 'The class "%s" doesn\'t have a property with the given name: "%s".',
- is_object($object) ? get_class($object) : $object,
- $name
- )
- );
- }
-}
diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DateIntervalFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DateIntervalFilter.php
deleted file mode 100644
index becd1cf..0000000
--- a/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Date/DateIntervalFilter.php
+++ /dev/null
@@ -1,33 +0,0 @@
- $propertyValue) {
- $copy->{$propertyName} = $propertyValue;
- }
-
- return $copy;
- }
-}
diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ReplaceFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ReplaceFilter.php
deleted file mode 100644
index 164f8b8..0000000
--- a/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ReplaceFilter.php
+++ /dev/null
@@ -1,30 +0,0 @@
-callback = $callable;
- }
-
- /**
- * {@inheritdoc}
- */
- public function apply($element)
- {
- return call_user_func($this->callback, $element);
- }
-}
diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ShallowCopyFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ShallowCopyFilter.php
deleted file mode 100644
index a5fbd7a..0000000
--- a/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ShallowCopyFilter.php
+++ /dev/null
@@ -1,17 +0,0 @@
-copier = $copier;
- }
-
- /**
- * {@inheritdoc}
- */
- public function apply($element)
- {
- $newElement = clone $element;
-
- $copy = $this->createCopyClosure();
-
- return $copy($newElement);
- }
-
- private function createCopyClosure()
- {
- $copier = $this->copier;
-
- $copy = function (SplDoublyLinkedList $list) use ($copier) {
- // Replace each element in the list with a deep copy of itself
- for ($i = 1; $i <= $list->count(); $i++) {
- $copy = $copier->recursiveCopy($list->shift());
-
- $list->push($copy);
- }
-
- return $list;
- };
-
- return Closure::bind($copy, null, DeepCopy::class);
- }
-}
diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/TypeFilter.php b/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/TypeFilter.php
deleted file mode 100644
index 5785a7d..0000000
--- a/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/TypeFilter.php
+++ /dev/null
@@ -1,13 +0,0 @@
-type = $type;
- }
-
- /**
- * @param mixed $element
- *
- * @return boolean
- */
- public function matches($element)
- {
- return is_object($element) ? is_a($element, $this->type) : gettype($element) === $this->type;
- }
-}
diff --git a/vendor/myclabs/deep-copy/src/DeepCopy/deep_copy.php b/vendor/myclabs/deep-copy/src/DeepCopy/deep_copy.php
deleted file mode 100644
index 55dcc92..0000000
--- a/vendor/myclabs/deep-copy/src/DeepCopy/deep_copy.php
+++ /dev/null
@@ -1,20 +0,0 @@
-copy($value);
- }
-}
diff --git a/vendor/phpdocumentor/reflection-common/.scrutinizer.yml b/vendor/phpdocumentor/reflection-common/.scrutinizer.yml
deleted file mode 100644
index b83b01f..0000000
--- a/vendor/phpdocumentor/reflection-common/.scrutinizer.yml
+++ /dev/null
@@ -1,48 +0,0 @@
-before_commands:
- - "composer install --no-dev --prefer-source"
-
-checks:
- php:
- excluded_dependencies:
- - phpstan/phpstan
-
-tools:
- external_code_coverage:
- enabled: true
- timeout: 300
- filter:
- excluded_paths: ["tests", "vendor"]
- php_code_sniffer:
- enabled: true
- config:
- standard: PSR2
- filter:
- paths: ["src/*", "tests/*"]
- excluded_paths: []
- php_cpd:
- enabled: true
- excluded_dirs: ["tests", "vendor"]
- php_cs_fixer:
- enabled: true
- config:
- level: all
- filter:
- paths: ["src/*", "tests/*"]
- php_loc:
- enabled: true
- excluded_dirs: ["tests", "vendor"]
- php_mess_detector:
- enabled: true
- config:
- ruleset: phpmd.xml.dist
- design_rules: { eval_expression: false }
- filter:
- paths: ["src/*"]
- php_pdepend:
- enabled: true
- excluded_dirs: ["tests", "vendor"]
- php_analyzer:
- enabled: true
- filter:
- paths: ["src/*", "tests/*"]
- sensiolabs_security_checker: true
diff --git a/vendor/phpdocumentor/reflection-common/.travis.yml b/vendor/phpdocumentor/reflection-common/.travis.yml
deleted file mode 100644
index 2263ed4..0000000
--- a/vendor/phpdocumentor/reflection-common/.travis.yml
+++ /dev/null
@@ -1,53 +0,0 @@
-language: php
-php: [ 7.1, 7.2, nightly ]
-sudo: false
-
-env:
-
-matrix:
- fast_finish: true
- allow_failures:
- - php: nightly
-
-install:
- - travis_retry composer install --no-interaction --prefer-dist --optimize-autoloader
-
-script:
- - ./vendor/bin/phpunit --no-coverage
-
-jobs:
- include:
- - stage: analysis
- php: 7.1
- script:
- - ./vendor/bin/phpunit
- after_script:
- - travis_retry wget --no-verbose https://phar.io/releases/phive.phar
- - travis_retry php phive.phar --no-progress install --trust-gpg-keys E82B2FB314E9906E php-coveralls/php-coveralls && ./tools/php-coveralls --verbose
- - travis_retry wget --no-verbose https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
-
- - stage: analysis
- php: 7.1
- before_script:
- - travis_retry wget --no-verbose https://phar.io/releases/phive.phar
- - travis_retry php phive.phar --no-progress install --trust-gpg-keys 8E730BA25823D8B5 phpstan
- script:
- - ./tools/phpstan analyse src --level max --configuration phpstan.neon
-
- - stage: analysis
- php: 7.1
- script:
- - composer create-project symplify/easy-coding-standard temp/ecs ^3 && temp/ecs/bin/ecs check src tests
-
-cache:
- directories:
- - $HOME/.composer
- - $HOME/.phive
-
-notifications:
- irc: "irc.freenode.org#phpdocumentor"
- slack:
- secure: "fjumM0h+4w3EYM4dpgqvpiCug7m4sSIC5+HATgwga/Nrc6IjlbWvGOv3JPgD3kQUhi18VmZfUYPmCv916SIbMnv8JWcrSaJXnPCgmxidvYkuzQDIw1HDJbVppGnkmwQA/qjIrM3sIEMfnu/arLRJQLI363aStZzGPxwIa4PDKcg="
- email:
- - me@mikevanriel.com
- - ashnazg@php.net
diff --git a/vendor/phpdocumentor/reflection-common/LICENSE b/vendor/phpdocumentor/reflection-common/LICENSE
deleted file mode 100644
index ed6926c..0000000
--- a/vendor/phpdocumentor/reflection-common/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 phpDocumentor
-
-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.
-
diff --git a/vendor/phpdocumentor/reflection-common/README.md b/vendor/phpdocumentor/reflection-common/README.md
deleted file mode 100644
index a8bf63d..0000000
--- a/vendor/phpdocumentor/reflection-common/README.md
+++ /dev/null
@@ -1,12 +0,0 @@
-[](https://opensource.org/licenses/MIT)
-[](https://travis-ci.org/phpDocumentor/ReflectionCommon)
-[](https://ci.appveyor.com/project/phpDocumentor/ReflectionCommon/branch/master)
-[](https://coveralls.io/github/phpDocumentor/ReflectionCommon?branch=master)
-[](https://scrutinizer-ci.com/g/phpDocumentor/ReflectionCommon/?branch=master)
-[](https://scrutinizer-ci.com/g/phpDocumentor/ReflectionCommon/?branch=master)
-[](https://packagist.org/packages/phpDocumentor/Reflection-Common)
-[](https://packagist.org/packages/phpDocumentor/Reflection-Common)
-
-
-ReflectionCommon
-================
diff --git a/vendor/phpdocumentor/reflection-common/appveyor.yml b/vendor/phpdocumentor/reflection-common/appveyor.yml
deleted file mode 100644
index 46e4705..0000000
--- a/vendor/phpdocumentor/reflection-common/appveyor.yml
+++ /dev/null
@@ -1,52 +0,0 @@
-build: false
-clone_folder: c:\reflectioncommon
-max_jobs: 3
-platform: x86
-pull_requests:
- do_not_increment_build_number: true
-version: '{build}.{branch}'
-skip_tags: true
-branches:
- only:
- - master
-
-environment:
- matrix:
- - php_ver_target: 7.1
- - php_ver_target: 7.2
-matrix:
- fast_finish: false
-
-cache:
- - c:\php -> appveyor.yml
- - '%LOCALAPPDATA%\Composer\files'
-
-init:
- - SET PATH=C:\Program Files\OpenSSL;c:\tools\php;%PATH%
- - SET COMPOSER_NO_INTERACTION=1
- - SET PHP=1
- - SET ANSICON=121x90 (121x90)
-
-
-install:
- - IF EXIST c:\tools\php (SET PHP=0)
- - ps: appveyor-retry cinst --params '""/InstallDir:C:\tools\php""' --ignore-checksums -y php --version ((choco search php --exact --all-versions -r | select-string -pattern $env:php_ver_target | sort { [version]($_ -split '\|' | select -last 1) } -Descending | Select-Object -first 1) -replace '[php|]','')
- - cd c:\tools\php
- - IF %PHP%==1 copy /Y php.ini-development php.ini
- - IF %PHP%==1 echo max_execution_time=1200 >> php.ini
- - IF %PHP%==1 echo date.timezone="UTC" >> php.ini
- - IF %PHP%==1 echo extension_dir=ext >> php.ini
- - IF %PHP%==1 echo extension=php_curl.dll >> php.ini
- - IF %PHP%==1 echo extension=php_openssl.dll >> php.ini
- - IF %PHP%==1 echo extension=php_mbstring.dll >> php.ini
- - IF %PHP%==1 echo extension=php_fileinfo.dll >> php.ini
- - IF %PHP%==1 echo zend.assertions=1 >> php.ini
- - IF %PHP%==1 echo assert.exception=On >> php.ini
- - IF %PHP%==1 echo @php %%~dp0composer.phar %%* > composer.bat
- - appveyor-retry appveyor DownloadFile https://getcomposer.org/composer.phar
- - cd c:\reflectioncommon
- - composer install --no-interaction --prefer-dist --no-progress
-
-test_script:
- - cd c:\reflectioncommon
- - vendor\bin\phpunit --no-coverage
diff --git a/vendor/phpdocumentor/reflection-common/composer.json b/vendor/phpdocumentor/reflection-common/composer.json
deleted file mode 100644
index 6daeb50..0000000
--- a/vendor/phpdocumentor/reflection-common/composer.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- "name": "phpdocumentor/reflection-common",
- "keywords": ["phpdoc", "phpDocumentor", "reflection", "static analysis", "FQSEN"],
- "homepage": "http://www.phpdoc.org",
- "description": "Common reflection classes used by phpdocumentor to reflect the code structure",
- "license": "MIT",
- "authors": [
- {
- "name": "Jaap van Otterdijk",
- "email": "opensource@ijaap.nl"
- }
- ],
- "require": {
- "php": ">=7.1"
- },
- "autoload" : {
- "psr-4" : {
- "phpDocumentor\\Reflection\\": "src/"
- }
- },
- "require-dev": {
- "phpunit/phpunit": "~6"
- },
- "extra": {
- "branch-alias": {
- "dev-master": "2.x-dev"
- }
- }
-}
diff --git a/vendor/phpdocumentor/reflection-common/easy-coding-standard.neon b/vendor/phpdocumentor/reflection-common/easy-coding-standard.neon
deleted file mode 100644
index 559a897..0000000
--- a/vendor/phpdocumentor/reflection-common/easy-coding-standard.neon
+++ /dev/null
@@ -1,17 +0,0 @@
-includes:
- - temp/ecs/config/clean-code.neon
- - temp/ecs/config/psr2.neon
- - temp/ecs/config/common.neon
-
-parameters:
- exclude_checkers:
- # from temp/ecs/config/common.neon
- - PhpCsFixer\Fixer\ClassNotation\OrderedClassElementsFixer
- - PhpCsFixer\Fixer\PhpUnit\PhpUnitStrictFixer
- - PhpCsFixer\Fixer\ControlStructure\YodaStyleFixer
- # from temp/ecs/config/spaces.neon
- - PhpCsFixer\Fixer\Operator\NotOperatorWithSuccessorSpaceFixer
-
- skip:
- PHP_CodeSniffer\Standards\Generic\Sniffs\NamingConventions\CamelCapsFunctionNameSniff:
- - */tests/**
diff --git a/vendor/phpdocumentor/reflection-common/phive.xml b/vendor/phpdocumentor/reflection-common/phive.xml
deleted file mode 100644
index 5630fde..0000000
--- a/vendor/phpdocumentor/reflection-common/phive.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/vendor/phpdocumentor/reflection-common/phpmd.xml.dist b/vendor/phpdocumentor/reflection-common/phpmd.xml.dist
deleted file mode 100644
index 9abf85c..0000000
--- a/vendor/phpdocumentor/reflection-common/phpmd.xml.dist
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- 40
-
-
-
diff --git a/vendor/phpdocumentor/reflection-common/phpstan.neon b/vendor/phpdocumentor/reflection-common/phpstan.neon
deleted file mode 100644
index e69de29..0000000
diff --git a/vendor/phpdocumentor/reflection-common/src/Element.php b/vendor/phpdocumentor/reflection-common/src/Element.php
deleted file mode 100644
index b3820f8..0000000
--- a/vendor/phpdocumentor/reflection-common/src/Element.php
+++ /dev/null
@@ -1,31 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection;
-
-/**
- * Interface for files processed by the ProjectFactory
- */
-interface File
-{
- /**
- * Returns the content of the file as a string.
- */
- public function getContents(): string;
-
- /**
- * Returns md5 hash of the file.
- */
- public function md5(): string;
-
- /**
- * Returns an relative path to the file.
- */
- public function path(): string;
-}
diff --git a/vendor/phpdocumentor/reflection-common/src/Fqsen.php b/vendor/phpdocumentor/reflection-common/src/Fqsen.php
deleted file mode 100644
index 9fc0c64..0000000
--- a/vendor/phpdocumentor/reflection-common/src/Fqsen.php
+++ /dev/null
@@ -1,81 +0,0 @@
-fqsen = $fqsen;
-
- if (isset($matches[2])) {
- $this->name = $matches[2];
- } else {
- $matches = explode('\\', $fqsen);
- $this->name = trim(end($matches), '()');
- }
- }
-
- /**
- * converts this class to string.
- */
- public function __toString(): string
- {
- return $this->fqsen;
- }
-
- /**
- * Returns the name of the element without path.
- */
- public function getName(): string
- {
- return $this->name;
- }
-}
diff --git a/vendor/phpdocumentor/reflection-common/src/Location.php b/vendor/phpdocumentor/reflection-common/src/Location.php
deleted file mode 100644
index fdb1816..0000000
--- a/vendor/phpdocumentor/reflection-common/src/Location.php
+++ /dev/null
@@ -1,52 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection;
-
-/**
- * The location where an element occurs within a file.
- */
-final class Location
-{
- /** @var int */
- private $lineNumber = 0;
-
- /** @var int */
- private $columnNumber = 0;
-
- /**
- * Initializes the location for an element using its line number in the file and optionally the column number.
- */
- public function __construct(int $lineNumber, int $columnNumber = 0)
- {
- $this->lineNumber = $lineNumber;
- $this->columnNumber = $columnNumber;
- }
-
- /**
- * Returns the line number that is covered by this location.
- */
- public function getLineNumber(): int
- {
- return $this->lineNumber;
- }
-
- /**
- * Returns the column number (character position on a line) for this location object.
- */
- public function getColumnNumber(): int
- {
- return $this->columnNumber;
- }
-}
diff --git a/vendor/phpdocumentor/reflection-common/src/Project.php b/vendor/phpdocumentor/reflection-common/src/Project.php
deleted file mode 100644
index 7d4b176..0000000
--- a/vendor/phpdocumentor/reflection-common/src/Project.php
+++ /dev/null
@@ -1,26 +0,0 @@
-create($docComment);
-```
-
-The `create` method will yield an object of type `\phpDocumentor\Reflection\DocBlock`
-whose methods can be queried:
-
-```php
-// Contains the summary for this DocBlock
-$summary = $docblock->getSummary();
-
-// Contains \phpDocumentor\Reflection\DocBlock\Description object
-$description = $docblock->getDescription();
-
-// You can either cast it to string
-$description = (string) $docblock->getDescription();
-
-// Or use the render method to get a string representation of the Description.
-$description = $docblock->getDescription()->render();
-```
-
-> For more examples it would be best to review the scripts in the [`/examples` folder](/examples).
diff --git a/vendor/phpdocumentor/reflection-docblock/appveyor.yml b/vendor/phpdocumentor/reflection-docblock/appveyor.yml
deleted file mode 100644
index 2a650d9..0000000
--- a/vendor/phpdocumentor/reflection-docblock/appveyor.yml
+++ /dev/null
@@ -1,54 +0,0 @@
-build: false
-clone_folder: c:\reflectiondocblock
-max_jobs: 3
-platform: x86
-pull_requests:
- do_not_increment_build_number: true
-version: '{build}.{branch}'
-skip_tags: true
-branches:
- only:
- - master
-
-environment:
- matrix:
- - php_ver_target: 7.1
- - php_ver_target: 7.2
-matrix:
- fast_finish: false
-
-cache:
- - c:\php -> appveyor.yml
- - '%LOCALAPPDATA%\Composer\files'
-
-init:
- - SET PATH=C:\Program Files\OpenSSL;c:\tools\php;%PATH%
- - SET COMPOSER_NO_INTERACTION=1
- - SET PHP=1
- - SET ANSICON=121x90 (121x90)
-
-
-install:
- - IF EXIST c:\tools\php (SET PHP=0)
- - ps: appveyor-retry cinst --params '""/InstallDir:C:\tools\php""' --ignore-checksums -y php --version ((choco search php --exact --all-versions -r | select-string -pattern $env:php_ver_target | sort { [version]($_ -split '\|' | select -last 1) } -Descending | Select-Object -first 1) -replace '[php|]','')
- - cd c:\tools\php
- - IF %PHP%==1 copy /Y php.ini-development php.ini
- - IF %PHP%==1 echo max_execution_time=1200 >> php.ini
- - IF %PHP%==1 echo date.timezone="UTC" >> php.ini
- - IF %PHP%==1 echo extension_dir=ext >> php.ini
- - IF %PHP%==1 echo extension=php_curl.dll >> php.ini
- - IF %PHP%==1 echo extension=php_openssl.dll >> php.ini
- - IF %PHP%==1 echo extension=php_mbstring.dll >> php.ini
- - IF %PHP%==1 echo extension=php_fileinfo.dll >> php.ini
- - IF %PHP%==1 echo zend.assertions=1 >> php.ini
- - IF %PHP%==1 echo assert.exception=On >> php.ini
- - IF %PHP%==1 echo @php %%~dp0composer.phar %%* > composer.bat
- - appveyor-retry appveyor DownloadFile https://getcomposer.org/composer.phar
- - cd c:\reflectiondocblock
- - composer install --no-interaction --prefer-dist --no-progress
- - composer global require phpunit/phpunit ^6
- - composer global config bin-dir --absolute
-
-test_script:
- - cd c:\reflectiondocblock
- - c:\Users\appveyor\AppData\Roaming\Composer\vendor\bin\phpunit --no-coverage
diff --git a/vendor/phpdocumentor/reflection-docblock/composer.json b/vendor/phpdocumentor/reflection-docblock/composer.json
deleted file mode 100644
index f15fe38..0000000
--- a/vendor/phpdocumentor/reflection-docblock/composer.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "name": "phpdocumentor/reflection-docblock",
- "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
- "type": "library",
- "license": "MIT",
- "authors": [
- {
- "name": "Mike van Riel",
- "email": "me@mikevanriel.com"
- }
- ],
- "require": {
- "php": "^7.0",
- "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0",
- "phpdocumentor/type-resolver": "~0.4 || ^1.0.0",
- "webmozart/assert": "^1.0"
- },
- "autoload": {
- "psr-4": {"phpDocumentor\\Reflection\\": ["src/"]}
- },
- "autoload-dev": {
- "psr-4": {"phpDocumentor\\Reflection\\": ["tests/unit"]}
- },
- "require-dev": {
- "mockery/mockery": "^1.0",
- "phpunit/phpunit": "^6.4",
- "doctrine/instantiator": "^1.0.5"
- },
- "extra": {
- "branch-alias": {
- "dev-master": "4.x-dev"
- }
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/easy-coding-standard.neon b/vendor/phpdocumentor/reflection-docblock/easy-coding-standard.neon
deleted file mode 100644
index 7c2ba6e..0000000
--- a/vendor/phpdocumentor/reflection-docblock/easy-coding-standard.neon
+++ /dev/null
@@ -1,31 +0,0 @@
-includes:
- - temp/ecs/config/clean-code.neon
- - temp/ecs/config/psr2-checkers.neon
- - temp/ecs/config/spaces.neon
- - temp/ecs/config/common.neon
-
-checkers:
- PhpCsFixer\Fixer\Operator\ConcatSpaceFixer:
- spacing: one
-
-parameters:
- exclude_checkers:
- # from temp/ecs/config/common.neon
- - PhpCsFixer\Fixer\ClassNotation\OrderedClassElementsFixer
- - PhpCsFixer\Fixer\PhpUnit\PhpUnitStrictFixer
- - PhpCsFixer\Fixer\ControlStructure\YodaStyleFixer
- # from temp/ecs/config/spaces.neon
- - PhpCsFixer\Fixer\Operator\NotOperatorWithSuccessorSpaceFixer
-
- skip:
- SlevomatCodingStandard\Sniffs\Classes\UnusedPrivateElementsSniff:
- # WIP code
- - src/DocBlock/StandardTagFactory.php
- PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis\EmptyStatementSniff:
- # WIP code
- - src/DocBlock/StandardTagFactory.php
- PHP_CodeSniffer\Standards\Squiz\Sniffs\Classes\ValidClassNameSniff:
- - src/DocBlock/Tags/Return_.php
- - src/DocBlock/Tags/Var_.php
- PHP_CodeSniffer\Standards\Generic\Sniffs\NamingConventions\CamelCapsFunctionNameSniff:
- - */tests/**
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock.php
deleted file mode 100644
index 46605b7..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock.php
+++ /dev/null
@@ -1,236 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection;
-
-use phpDocumentor\Reflection\DocBlock\Tag;
-use Webmozart\Assert\Assert;
-
-final class DocBlock
-{
- /** @var string The opening line for this docblock. */
- private $summary = '';
-
- /** @var DocBlock\Description The actual description for this docblock. */
- private $description = null;
-
- /** @var Tag[] An array containing all the tags in this docblock; except inline. */
- private $tags = [];
-
- /** @var Types\Context Information about the context of this DocBlock. */
- private $context = null;
-
- /** @var Location Information about the location of this DocBlock. */
- private $location = null;
-
- /** @var bool Is this DocBlock (the start of) a template? */
- private $isTemplateStart = false;
-
- /** @var bool Does this DocBlock signify the end of a DocBlock template? */
- private $isTemplateEnd = false;
-
- /**
- * @param string $summary
- * @param DocBlock\Description $description
- * @param DocBlock\Tag[] $tags
- * @param Types\Context $context The context in which the DocBlock occurs.
- * @param Location $location The location within the file that this DocBlock occurs in.
- * @param bool $isTemplateStart
- * @param bool $isTemplateEnd
- */
- public function __construct(
- $summary = '',
- DocBlock\Description $description = null,
- array $tags = [],
- Types\Context $context = null,
- Location $location = null,
- $isTemplateStart = false,
- $isTemplateEnd = false
- ) {
- Assert::string($summary);
- Assert::boolean($isTemplateStart);
- Assert::boolean($isTemplateEnd);
- Assert::allIsInstanceOf($tags, Tag::class);
-
- $this->summary = $summary;
- $this->description = $description ?: new DocBlock\Description('');
- foreach ($tags as $tag) {
- $this->addTag($tag);
- }
-
- $this->context = $context;
- $this->location = $location;
-
- $this->isTemplateEnd = $isTemplateEnd;
- $this->isTemplateStart = $isTemplateStart;
- }
-
- /**
- * @return string
- */
- public function getSummary()
- {
- return $this->summary;
- }
-
- /**
- * @return DocBlock\Description
- */
- public function getDescription()
- {
- return $this->description;
- }
-
- /**
- * Returns the current context.
- *
- * @return Types\Context
- */
- public function getContext()
- {
- return $this->context;
- }
-
- /**
- * Returns the current location.
- *
- * @return Location
- */
- public function getLocation()
- {
- return $this->location;
- }
-
- /**
- * Returns whether this DocBlock is the start of a Template section.
- *
- * A Docblock may serve as template for a series of subsequent DocBlocks. This is indicated by a special marker
- * (`#@+`) that is appended directly after the opening `/**` of a DocBlock.
- *
- * An example of such an opening is:
- *
- * ```
- * /**#@+
- * * My DocBlock
- * * /
- * ```
- *
- * The description and tags (not the summary!) are copied onto all subsequent DocBlocks and also applied to all
- * elements that follow until another DocBlock is found that contains the closing marker (`#@-`).
- *
- * @see self::isTemplateEnd() for the check whether a closing marker was provided.
- *
- * @return boolean
- */
- public function isTemplateStart()
- {
- return $this->isTemplateStart;
- }
-
- /**
- * Returns whether this DocBlock is the end of a Template section.
- *
- * @see self::isTemplateStart() for a more complete description of the Docblock Template functionality.
- *
- * @return boolean
- */
- public function isTemplateEnd()
- {
- return $this->isTemplateEnd;
- }
-
- /**
- * Returns the tags for this DocBlock.
- *
- * @return Tag[]
- */
- public function getTags()
- {
- return $this->tags;
- }
-
- /**
- * Returns an array of tags matching the given name. If no tags are found
- * an empty array is returned.
- *
- * @param string $name String to search by.
- *
- * @return Tag[]
- */
- public function getTagsByName($name)
- {
- Assert::string($name);
-
- $result = [];
-
- /** @var Tag $tag */
- foreach ($this->getTags() as $tag) {
- if ($tag->getName() !== $name) {
- continue;
- }
-
- $result[] = $tag;
- }
-
- return $result;
- }
-
- /**
- * Checks if a tag of a certain type is present in this DocBlock.
- *
- * @param string $name Tag name to check for.
- *
- * @return bool
- */
- public function hasTag($name)
- {
- Assert::string($name);
-
- /** @var Tag $tag */
- foreach ($this->getTags() as $tag) {
- if ($tag->getName() === $name) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * Remove a tag from this DocBlock.
- *
- * @param Tag $tag The tag to remove.
- *
- * @return void
- */
- public function removeTag(Tag $tagToRemove)
- {
- foreach ($this->tags as $key => $tag) {
- if ($tag === $tagToRemove) {
- unset($this->tags[$key]);
- break;
- }
- }
- }
-
- /**
- * Adds a tag to this DocBlock.
- *
- * @param Tag $tag The tag to add.
- *
- * @return void
- */
- private function addTag(Tag $tag)
- {
- $this->tags[] = $tag;
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Description.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Description.php
deleted file mode 100644
index 25a79e0..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Description.php
+++ /dev/null
@@ -1,114 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock;
-
-use phpDocumentor\Reflection\DocBlock\Tags\Formatter;
-use phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter;
-use Webmozart\Assert\Assert;
-
-/**
- * Object representing to description for a DocBlock.
- *
- * A Description object can consist of plain text but can also include tags. A Description Formatter can then combine
- * a body template with sprintf-style placeholders together with formatted tags in order to reconstitute a complete
- * description text using the format that you would prefer.
- *
- * Because parsing a Description text can be a verbose process this is handled by the {@see DescriptionFactory}. It is
- * thus recommended to use that to create a Description object, like this:
- *
- * $description = $descriptionFactory->create('This is a {@see Description}', $context);
- *
- * The description factory will interpret the given body and create a body template and list of tags from them, and pass
- * that onto the constructor if this class.
- *
- * > The $context variable is a class of type {@see \phpDocumentor\Reflection\Types\Context} and contains the namespace
- * > and the namespace aliases that apply to this DocBlock. These are used by the Factory to resolve and expand partial
- * > type names and FQSENs.
- *
- * If you do not want to use the DescriptionFactory you can pass a body template and tag listing like this:
- *
- * $description = new Description(
- * 'This is a %1$s',
- * [ new See(new Fqsen('\phpDocumentor\Reflection\DocBlock\Description')) ]
- * );
- *
- * It is generally recommended to use the Factory as that will also apply escaping rules, while the Description object
- * is mainly responsible for rendering.
- *
- * @see DescriptionFactory to create a new Description.
- * @see Description\Formatter for the formatting of the body and tags.
- */
-class Description
-{
- /** @var string */
- private $bodyTemplate;
-
- /** @var Tag[] */
- private $tags;
-
- /**
- * Initializes a Description with its body (template) and a listing of the tags used in the body template.
- *
- * @param string $bodyTemplate
- * @param Tag[] $tags
- */
- public function __construct($bodyTemplate, array $tags = [])
- {
- Assert::string($bodyTemplate);
-
- $this->bodyTemplate = $bodyTemplate;
- $this->tags = $tags;
- }
-
- /**
- * Returns the tags for this DocBlock.
- *
- * @return Tag[]
- */
- public function getTags()
- {
- return $this->tags;
- }
-
- /**
- * Renders this description as a string where the provided formatter will format the tags in the expected string
- * format.
- *
- * @param Formatter|null $formatter
- *
- * @return string
- */
- public function render(Formatter $formatter = null)
- {
- if ($formatter === null) {
- $formatter = new PassthroughFormatter();
- }
-
- $tags = [];
- foreach ($this->tags as $tag) {
- $tags[] = '{' . $formatter->format($tag) . '}';
- }
-
- return vsprintf($this->bodyTemplate, $tags);
- }
-
- /**
- * Returns a plain string representation of this description.
- *
- * @return string
- */
- public function __toString()
- {
- return $this->render();
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/DescriptionFactory.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/DescriptionFactory.php
deleted file mode 100644
index 48f9c21..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/DescriptionFactory.php
+++ /dev/null
@@ -1,191 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock;
-
-use phpDocumentor\Reflection\Types\Context as TypeContext;
-
-/**
- * Creates a new Description object given a body of text.
- *
- * Descriptions in phpDocumentor are somewhat complex entities as they can contain one or more tags inside their
- * body that can be replaced with a readable output. The replacing is done by passing a Formatter object to the
- * Description object's `render` method.
- *
- * In addition to the above does a Description support two types of escape sequences:
- *
- * 1. `{@}` to escape the `@` character to prevent it from being interpreted as part of a tag, i.e. `{{@}link}`
- * 2. `{}` to escape the `}` character, this can be used if you want to use the `}` character in the description
- * of an inline tag.
- *
- * If a body consists of multiple lines then this factory will also remove any superfluous whitespace at the beginning
- * of each line while maintaining any indentation that is used. This will prevent formatting parsers from tripping
- * over unexpected spaces as can be observed with tag descriptions.
- */
-class DescriptionFactory
-{
- /** @var TagFactory */
- private $tagFactory;
-
- /**
- * Initializes this factory with the means to construct (inline) tags.
- *
- * @param TagFactory $tagFactory
- */
- public function __construct(TagFactory $tagFactory)
- {
- $this->tagFactory = $tagFactory;
- }
-
- /**
- * Returns the parsed text of this description.
- *
- * @param string $contents
- * @param TypeContext $context
- *
- * @return Description
- */
- public function create($contents, TypeContext $context = null)
- {
- list($text, $tags) = $this->parse($this->lex($contents), $context);
-
- return new Description($text, $tags);
- }
-
- /**
- * Strips the contents from superfluous whitespace and splits the description into a series of tokens.
- *
- * @param string $contents
- *
- * @return string[] A series of tokens of which the description text is composed.
- */
- private function lex($contents)
- {
- $contents = $this->removeSuperfluousStartingWhitespace($contents);
-
- // performance optimalization; if there is no inline tag, don't bother splitting it up.
- if (strpos($contents, '{@') === false) {
- return [$contents];
- }
-
- return preg_split(
- '/\{
- # "{@}" is not a valid inline tag. This ensures that we do not treat it as one, but treat it literally.
- (?!@\})
- # We want to capture the whole tag line, but without the inline tag delimiters.
- (\@
- # Match everything up to the next delimiter.
- [^{}]*
- # Nested inline tag content should not be captured, or it will appear in the result separately.
- (?:
- # Match nested inline tags.
- (?:
- # Because we did not catch the tag delimiters earlier, we must be explicit with them here.
- # Notice that this also matches "{}", as a way to later introduce it as an escape sequence.
- \{(?1)?\}
- |
- # Make sure we match hanging "{".
- \{
- )
- # Match content after the nested inline tag.
- [^{}]*
- )* # If there are more inline tags, match them as well. We use "*" since there may not be any
- # nested inline tags.
- )
- \}/Sux',
- $contents,
- null,
- PREG_SPLIT_DELIM_CAPTURE
- );
- }
-
- /**
- * Parses the stream of tokens in to a new set of tokens containing Tags.
- *
- * @param string[] $tokens
- * @param TypeContext $context
- *
- * @return string[]|Tag[]
- */
- private function parse($tokens, TypeContext $context)
- {
- $count = count($tokens);
- $tagCount = 0;
- $tags = [];
-
- for ($i = 1; $i < $count; $i += 2) {
- $tags[] = $this->tagFactory->create($tokens[$i], $context);
- $tokens[$i] = '%' . ++$tagCount . '$s';
- }
-
- //In order to allow "literal" inline tags, the otherwise invalid
- //sequence "{@}" is changed to "@", and "{}" is changed to "}".
- //"%" is escaped to "%%" because of vsprintf.
- //See unit tests for examples.
- for ($i = 0; $i < $count; $i += 2) {
- $tokens[$i] = str_replace(['{@}', '{}', '%'], ['@', '}', '%%'], $tokens[$i]);
- }
-
- return [implode('', $tokens), $tags];
- }
-
- /**
- * Removes the superfluous from a multi-line description.
- *
- * When a description has more than one line then it can happen that the second and subsequent lines have an
- * additional indentation. This is commonly in use with tags like this:
- *
- * {@}since 1.1.0 This is an example
- * description where we have an
- * indentation in the second and
- * subsequent lines.
- *
- * If we do not normalize the indentation then we have superfluous whitespace on the second and subsequent
- * lines and this may cause rendering issues when, for example, using a Markdown converter.
- *
- * @param string $contents
- *
- * @return string
- */
- private function removeSuperfluousStartingWhitespace($contents)
- {
- $lines = explode("\n", $contents);
-
- // if there is only one line then we don't have lines with superfluous whitespace and
- // can use the contents as-is
- if (count($lines) <= 1) {
- return $contents;
- }
-
- // determine how many whitespace characters need to be stripped
- $startingSpaceCount = 9999999;
- for ($i = 1; $i < count($lines); $i++) {
- // lines with a no length do not count as they are not indented at all
- if (strlen(trim($lines[$i])) === 0) {
- continue;
- }
-
- // determine the number of prefixing spaces by checking the difference in line length before and after
- // an ltrim
- $startingSpaceCount = min($startingSpaceCount, strlen($lines[$i]) - strlen(ltrim($lines[$i])));
- }
-
- // strip the number of spaces from each line
- if ($startingSpaceCount > 0) {
- for ($i = 1; $i < count($lines); $i++) {
- $lines[$i] = substr($lines[$i], $startingSpaceCount);
- }
- }
-
- return implode("\n", $lines);
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/ExampleFinder.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/ExampleFinder.php
deleted file mode 100644
index 571ed74..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/ExampleFinder.php
+++ /dev/null
@@ -1,170 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock;
-
-use phpDocumentor\Reflection\DocBlock\Tags\Example;
-
-/**
- * Class used to find an example file's location based on a given ExampleDescriptor.
- */
-class ExampleFinder
-{
- /** @var string */
- private $sourceDirectory = '';
-
- /** @var string[] */
- private $exampleDirectories = [];
-
- /**
- * Attempts to find the example contents for the given descriptor.
- *
- * @param Example $example
- *
- * @return string
- */
- public function find(Example $example)
- {
- $filename = $example->getFilePath();
-
- $file = $this->getExampleFileContents($filename);
- if (!$file) {
- return "** File not found : {$filename} **";
- }
-
- return implode('', array_slice($file, $example->getStartingLine() - 1, $example->getLineCount()));
- }
-
- /**
- * Registers the project's root directory where an 'examples' folder can be expected.
- *
- * @param string $directory
- *
- * @return void
- */
- public function setSourceDirectory($directory = '')
- {
- $this->sourceDirectory = $directory;
- }
-
- /**
- * Returns the project's root directory where an 'examples' folder can be expected.
- *
- * @return string
- */
- public function getSourceDirectory()
- {
- return $this->sourceDirectory;
- }
-
- /**
- * Registers a series of directories that may contain examples.
- *
- * @param string[] $directories
- */
- public function setExampleDirectories(array $directories)
- {
- $this->exampleDirectories = $directories;
- }
-
- /**
- * Returns a series of directories that may contain examples.
- *
- * @return string[]
- */
- public function getExampleDirectories()
- {
- return $this->exampleDirectories;
- }
-
- /**
- * Attempts to find the requested example file and returns its contents or null if no file was found.
- *
- * This method will try several methods in search of the given example file, the first one it encounters is
- * returned:
- *
- * 1. Iterates through all examples folders for the given filename
- * 2. Checks the source folder for the given filename
- * 3. Checks the 'examples' folder in the current working directory for examples
- * 4. Checks the path relative to the current working directory for the given filename
- *
- * @param string $filename
- *
- * @return string|null
- */
- private function getExampleFileContents($filename)
- {
- $normalizedPath = null;
-
- foreach ($this->exampleDirectories as $directory) {
- $exampleFileFromConfig = $this->constructExamplePath($directory, $filename);
- if (is_readable($exampleFileFromConfig)) {
- $normalizedPath = $exampleFileFromConfig;
- break;
- }
- }
-
- if (!$normalizedPath) {
- if (is_readable($this->getExamplePathFromSource($filename))) {
- $normalizedPath = $this->getExamplePathFromSource($filename);
- } elseif (is_readable($this->getExamplePathFromExampleDirectory($filename))) {
- $normalizedPath = $this->getExamplePathFromExampleDirectory($filename);
- } elseif (is_readable($filename)) {
- $normalizedPath = $filename;
- }
- }
-
- return $normalizedPath && is_readable($normalizedPath) ? file($normalizedPath) : null;
- }
-
- /**
- * Get example filepath based on the example directory inside your project.
- *
- * @param string $file
- *
- * @return string
- */
- private function getExamplePathFromExampleDirectory($file)
- {
- return getcwd() . DIRECTORY_SEPARATOR . 'examples' . DIRECTORY_SEPARATOR . $file;
- }
-
- /**
- * Returns a path to the example file in the given directory..
- *
- * @param string $directory
- * @param string $file
- *
- * @return string
- */
- private function constructExamplePath($directory, $file)
- {
- return rtrim($directory, '\\/') . DIRECTORY_SEPARATOR . $file;
- }
-
- /**
- * Get example filepath based on sourcecode.
- *
- * @param string $file
- *
- * @return string
- */
- private function getExamplePathFromSource($file)
- {
- return sprintf(
- '%s%s%s',
- trim($this->getSourceDirectory(), '\\/'),
- DIRECTORY_SEPARATOR,
- trim($file, '"')
- );
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Serializer.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Serializer.php
deleted file mode 100644
index 0f355f5..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Serializer.php
+++ /dev/null
@@ -1,155 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock;
-
-use phpDocumentor\Reflection\DocBlock;
-use Webmozart\Assert\Assert;
-
-/**
- * Converts a DocBlock back from an object to a complete DocComment including Asterisks.
- */
-class Serializer
-{
- /** @var string The string to indent the comment with. */
- protected $indentString = ' ';
-
- /** @var int The number of times the indent string is repeated. */
- protected $indent = 0;
-
- /** @var bool Whether to indent the first line with the given indent amount and string. */
- protected $isFirstLineIndented = true;
-
- /** @var int|null The max length of a line. */
- protected $lineLength = null;
-
- /** @var DocBlock\Tags\Formatter A custom tag formatter. */
- protected $tagFormatter = null;
-
- /**
- * Create a Serializer instance.
- *
- * @param int $indent The number of times the indent string is repeated.
- * @param string $indentString The string to indent the comment with.
- * @param bool $indentFirstLine Whether to indent the first line.
- * @param int|null $lineLength The max length of a line or NULL to disable line wrapping.
- * @param DocBlock\Tags\Formatter $tagFormatter A custom tag formatter, defaults to PassthroughFormatter.
- */
- public function __construct($indent = 0, $indentString = ' ', $indentFirstLine = true, $lineLength = null, $tagFormatter = null)
- {
- Assert::integer($indent);
- Assert::string($indentString);
- Assert::boolean($indentFirstLine);
- Assert::nullOrInteger($lineLength);
- Assert::nullOrIsInstanceOf($tagFormatter, 'phpDocumentor\Reflection\DocBlock\Tags\Formatter');
-
- $this->indent = $indent;
- $this->indentString = $indentString;
- $this->isFirstLineIndented = $indentFirstLine;
- $this->lineLength = $lineLength;
- $this->tagFormatter = $tagFormatter ?: new DocBlock\Tags\Formatter\PassthroughFormatter();
- }
-
- /**
- * Generate a DocBlock comment.
- *
- * @param DocBlock $docblock The DocBlock to serialize.
- *
- * @return string The serialized doc block.
- */
- public function getDocComment(DocBlock $docblock)
- {
- $indent = str_repeat($this->indentString, $this->indent);
- $firstIndent = $this->isFirstLineIndented ? $indent : '';
- // 3 === strlen(' * ')
- $wrapLength = $this->lineLength ? $this->lineLength - strlen($indent) - 3 : null;
-
- $text = $this->removeTrailingSpaces(
- $indent,
- $this->addAsterisksForEachLine(
- $indent,
- $this->getSummaryAndDescriptionTextBlock($docblock, $wrapLength)
- )
- );
-
- $comment = "{$firstIndent}/**\n";
- if ($text) {
- $comment .= "{$indent} * {$text}\n";
- $comment .= "{$indent} *\n";
- }
-
- $comment = $this->addTagBlock($docblock, $wrapLength, $indent, $comment);
- $comment .= $indent . ' */';
-
- return $comment;
- }
-
- /**
- * @param $indent
- * @param $text
- * @return mixed
- */
- private function removeTrailingSpaces($indent, $text)
- {
- return str_replace("\n{$indent} * \n", "\n{$indent} *\n", $text);
- }
-
- /**
- * @param $indent
- * @param $text
- * @return mixed
- */
- private function addAsterisksForEachLine($indent, $text)
- {
- return str_replace("\n", "\n{$indent} * ", $text);
- }
-
- /**
- * @param DocBlock $docblock
- * @param $wrapLength
- * @return string
- */
- private function getSummaryAndDescriptionTextBlock(DocBlock $docblock, $wrapLength)
- {
- $text = $docblock->getSummary() . ((string)$docblock->getDescription() ? "\n\n" . $docblock->getDescription()
- : '');
- if ($wrapLength !== null) {
- $text = wordwrap($text, $wrapLength);
- return $text;
- }
-
- return $text;
- }
-
- /**
- * @param DocBlock $docblock
- * @param $wrapLength
- * @param $indent
- * @param $comment
- * @return string
- */
- private function addTagBlock(DocBlock $docblock, $wrapLength, $indent, $comment)
- {
- foreach ($docblock->getTags() as $tag) {
- $tagText = $this->tagFormatter->format($tag);
- if ($wrapLength !== null) {
- $tagText = wordwrap($tagText, $wrapLength);
- }
-
- $tagText = str_replace("\n", "\n{$indent} * ", $tagText);
-
- $comment .= "{$indent} * {$tagText}\n";
- }
-
- return $comment;
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php
deleted file mode 100644
index 5a8143c..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php
+++ /dev/null
@@ -1,319 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock;
-
-use phpDocumentor\Reflection\DocBlock\Tags\Factory\StaticMethod;
-use phpDocumentor\Reflection\DocBlock\Tags\Generic;
-use phpDocumentor\Reflection\FqsenResolver;
-use phpDocumentor\Reflection\Types\Context as TypeContext;
-use Webmozart\Assert\Assert;
-
-/**
- * Creates a Tag object given the contents of a tag.
- *
- * This Factory is capable of determining the appropriate class for a tag and instantiate it using its `create`
- * factory method. The `create` factory method of a Tag can have a variable number of arguments; this way you can
- * pass the dependencies that you need to construct a tag object.
- *
- * > Important: each parameter in addition to the body variable for the `create` method must default to null, otherwise
- * > it violates the constraint with the interface; it is recommended to use the {@see Assert::notNull()} method to
- * > verify that a dependency is actually passed.
- *
- * This Factory also features a Service Locator component that is used to pass the right dependencies to the
- * `create` method of a tag; each dependency should be registered as a service or as a parameter.
- *
- * When you want to use a Tag of your own with custom handling you need to call the `registerTagHandler` method, pass
- * the name of the tag and a Fully Qualified Class Name pointing to a class that implements the Tag interface.
- */
-final class StandardTagFactory implements TagFactory
-{
- /** PCRE regular expression matching a tag name. */
- const REGEX_TAGNAME = '[\w\-\_\\\\]+';
-
- /**
- * @var string[] An array with a tag as a key, and an FQCN to a class that handles it as an array value.
- */
- private $tagHandlerMappings = [
- 'author' => '\phpDocumentor\Reflection\DocBlock\Tags\Author',
- 'covers' => '\phpDocumentor\Reflection\DocBlock\Tags\Covers',
- 'deprecated' => '\phpDocumentor\Reflection\DocBlock\Tags\Deprecated',
- // 'example' => '\phpDocumentor\Reflection\DocBlock\Tags\Example',
- 'link' => '\phpDocumentor\Reflection\DocBlock\Tags\Link',
- 'method' => '\phpDocumentor\Reflection\DocBlock\Tags\Method',
- 'param' => '\phpDocumentor\Reflection\DocBlock\Tags\Param',
- 'property-read' => '\phpDocumentor\Reflection\DocBlock\Tags\PropertyRead',
- 'property' => '\phpDocumentor\Reflection\DocBlock\Tags\Property',
- 'property-write' => '\phpDocumentor\Reflection\DocBlock\Tags\PropertyWrite',
- 'return' => '\phpDocumentor\Reflection\DocBlock\Tags\Return_',
- 'see' => '\phpDocumentor\Reflection\DocBlock\Tags\See',
- 'since' => '\phpDocumentor\Reflection\DocBlock\Tags\Since',
- 'source' => '\phpDocumentor\Reflection\DocBlock\Tags\Source',
- 'throw' => '\phpDocumentor\Reflection\DocBlock\Tags\Throws',
- 'throws' => '\phpDocumentor\Reflection\DocBlock\Tags\Throws',
- 'uses' => '\phpDocumentor\Reflection\DocBlock\Tags\Uses',
- 'var' => '\phpDocumentor\Reflection\DocBlock\Tags\Var_',
- 'version' => '\phpDocumentor\Reflection\DocBlock\Tags\Version'
- ];
-
- /**
- * @var \ReflectionParameter[][] a lazy-loading cache containing parameters for each tagHandler that has been used.
- */
- private $tagHandlerParameterCache = [];
-
- /**
- * @var FqsenResolver
- */
- private $fqsenResolver;
-
- /**
- * @var mixed[] an array representing a simple Service Locator where we can store parameters and
- * services that can be inserted into the Factory Methods of Tag Handlers.
- */
- private $serviceLocator = [];
-
- /**
- * Initialize this tag factory with the means to resolve an FQSEN and optionally a list of tag handlers.
- *
- * If no tag handlers are provided than the default list in the {@see self::$tagHandlerMappings} property
- * is used.
- *
- * @param FqsenResolver $fqsenResolver
- * @param string[] $tagHandlers
- *
- * @see self::registerTagHandler() to add a new tag handler to the existing default list.
- */
- public function __construct(FqsenResolver $fqsenResolver, array $tagHandlers = null)
- {
- $this->fqsenResolver = $fqsenResolver;
- if ($tagHandlers !== null) {
- $this->tagHandlerMappings = $tagHandlers;
- }
-
- $this->addService($fqsenResolver, FqsenResolver::class);
- }
-
- /**
- * {@inheritDoc}
- */
- public function create($tagLine, TypeContext $context = null)
- {
- if (! $context) {
- $context = new TypeContext('');
- }
-
- list($tagName, $tagBody) = $this->extractTagParts($tagLine);
-
- if ($tagBody !== '' && $tagBody[0] === '[') {
- throw new \InvalidArgumentException(
- 'The tag "' . $tagLine . '" does not seem to be wellformed, please check it for errors'
- );
- }
-
- return $this->createTag($tagBody, $tagName, $context);
- }
-
- /**
- * {@inheritDoc}
- */
- public function addParameter($name, $value)
- {
- $this->serviceLocator[$name] = $value;
- }
-
- /**
- * {@inheritDoc}
- */
- public function addService($service, $alias = null)
- {
- $this->serviceLocator[$alias ?: get_class($service)] = $service;
- }
-
- /**
- * {@inheritDoc}
- */
- public function registerTagHandler($tagName, $handler)
- {
- Assert::stringNotEmpty($tagName);
- Assert::stringNotEmpty($handler);
- Assert::classExists($handler);
- Assert::implementsInterface($handler, StaticMethod::class);
-
- if (strpos($tagName, '\\') && $tagName[0] !== '\\') {
- throw new \InvalidArgumentException(
- 'A namespaced tag must have a leading backslash as it must be fully qualified'
- );
- }
-
- $this->tagHandlerMappings[$tagName] = $handler;
- }
-
- /**
- * Extracts all components for a tag.
- *
- * @param string $tagLine
- *
- * @return string[]
- */
- private function extractTagParts($tagLine)
- {
- $matches = [];
- if (! preg_match('/^@(' . self::REGEX_TAGNAME . ')(?:\s*([^\s].*)|$)/us', $tagLine, $matches)) {
- throw new \InvalidArgumentException(
- 'The tag "' . $tagLine . '" does not seem to be wellformed, please check it for errors'
- );
- }
-
- if (count($matches) < 3) {
- $matches[] = '';
- }
-
- return array_slice($matches, 1);
- }
-
- /**
- * Creates a new tag object with the given name and body or returns null if the tag name was recognized but the
- * body was invalid.
- *
- * @param string $body
- * @param string $name
- * @param TypeContext $context
- *
- * @return Tag|null
- */
- private function createTag($body, $name, TypeContext $context)
- {
- $handlerClassName = $this->findHandlerClassName($name, $context);
- $arguments = $this->getArgumentsForParametersFromWiring(
- $this->fetchParametersForHandlerFactoryMethod($handlerClassName),
- $this->getServiceLocatorWithDynamicParameters($context, $name, $body)
- );
-
- return call_user_func_array([$handlerClassName, 'create'], $arguments);
- }
-
- /**
- * Determines the Fully Qualified Class Name of the Factory or Tag (containing a Factory Method `create`).
- *
- * @param string $tagName
- * @param TypeContext $context
- *
- * @return string
- */
- private function findHandlerClassName($tagName, TypeContext $context)
- {
- $handlerClassName = Generic::class;
- if (isset($this->tagHandlerMappings[$tagName])) {
- $handlerClassName = $this->tagHandlerMappings[$tagName];
- } elseif ($this->isAnnotation($tagName)) {
- // TODO: Annotation support is planned for a later stage and as such is disabled for now
- // $tagName = (string)$this->fqsenResolver->resolve($tagName, $context);
- // if (isset($this->annotationMappings[$tagName])) {
- // $handlerClassName = $this->annotationMappings[$tagName];
- // }
- }
-
- return $handlerClassName;
- }
-
- /**
- * Retrieves the arguments that need to be passed to the Factory Method with the given Parameters.
- *
- * @param \ReflectionParameter[] $parameters
- * @param mixed[] $locator
- *
- * @return mixed[] A series of values that can be passed to the Factory Method of the tag whose parameters
- * is provided with this method.
- */
- private function getArgumentsForParametersFromWiring($parameters, $locator)
- {
- $arguments = [];
- foreach ($parameters as $index => $parameter) {
- $typeHint = $parameter->getClass() ? $parameter->getClass()->getName() : null;
- if (isset($locator[$typeHint])) {
- $arguments[] = $locator[$typeHint];
- continue;
- }
-
- $parameterName = $parameter->getName();
- if (isset($locator[$parameterName])) {
- $arguments[] = $locator[$parameterName];
- continue;
- }
-
- $arguments[] = null;
- }
-
- return $arguments;
- }
-
- /**
- * Retrieves a series of ReflectionParameter objects for the static 'create' method of the given
- * tag handler class name.
- *
- * @param string $handlerClassName
- *
- * @return \ReflectionParameter[]
- */
- private function fetchParametersForHandlerFactoryMethod($handlerClassName)
- {
- if (! isset($this->tagHandlerParameterCache[$handlerClassName])) {
- $methodReflection = new \ReflectionMethod($handlerClassName, 'create');
- $this->tagHandlerParameterCache[$handlerClassName] = $methodReflection->getParameters();
- }
-
- return $this->tagHandlerParameterCache[$handlerClassName];
- }
-
- /**
- * Returns a copy of this class' Service Locator with added dynamic parameters, such as the tag's name, body and
- * Context.
- *
- * @param TypeContext $context The Context (namespace and aliasses) that may be passed and is used to resolve FQSENs.
- * @param string $tagName The name of the tag that may be passed onto the factory method of the Tag class.
- * @param string $tagBody The body of the tag that may be passed onto the factory method of the Tag class.
- *
- * @return mixed[]
- */
- private function getServiceLocatorWithDynamicParameters(TypeContext $context, $tagName, $tagBody)
- {
- $locator = array_merge(
- $this->serviceLocator,
- [
- 'name' => $tagName,
- 'body' => $tagBody,
- TypeContext::class => $context
- ]
- );
-
- return $locator;
- }
-
- /**
- * Returns whether the given tag belongs to an annotation.
- *
- * @param string $tagContent
- *
- * @todo this method should be populated once we implement Annotation notation support.
- *
- * @return bool
- */
- private function isAnnotation($tagContent)
- {
- // 1. Contains a namespace separator
- // 2. Contains parenthesis
- // 3. Is present in a list of known annotations (make the algorithm smart by first checking is the last part
- // of the annotation class name matches the found tag name
-
- return false;
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tag.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tag.php
deleted file mode 100644
index e765367..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tag.php
+++ /dev/null
@@ -1,26 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock;
-
-use phpDocumentor\Reflection\DocBlock\Tags\Formatter;
-
-interface Tag
-{
- public function getName();
-
- public static function create($body);
-
- public function render(Formatter $formatter = null);
-
- public function __toString();
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/TagFactory.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/TagFactory.php
deleted file mode 100644
index 3c1d113..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/TagFactory.php
+++ /dev/null
@@ -1,93 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock;
-
-use phpDocumentor\Reflection\Types\Context as TypeContext;
-
-interface TagFactory
-{
- /**
- * Adds a parameter to the service locator that can be injected in a tag's factory method.
- *
- * When calling a tag's "create" method we always check the signature for dependencies to inject. One way is to
- * typehint a parameter in the signature so that we can use that interface or class name to inject a dependency
- * (see {@see addService()} for more information on that).
- *
- * Another way is to check the name of the argument against the names in the Service Locator. With this method
- * you can add a variable that will be inserted when a tag's create method is not typehinted and has a matching
- * name.
- *
- * Be aware that there are two reserved names:
- *
- * - name, representing the name of the tag.
- * - body, representing the complete body of the tag.
- *
- * These parameters are injected at the last moment and will override any existing parameter with those names.
- *
- * @param string $name
- * @param mixed $value
- *
- * @return void
- */
- public function addParameter($name, $value);
-
- /**
- * Registers a service with the Service Locator using the FQCN of the class or the alias, if provided.
- *
- * When calling a tag's "create" method we always check the signature for dependencies to inject. If a parameter
- * has a typehint then the ServiceLocator is queried to see if a Service is registered for that typehint.
- *
- * Because interfaces are regularly used as type-hints this method provides an alias parameter; if the FQCN of the
- * interface is passed as alias then every time that interface is requested the provided service will be returned.
- *
- * @param object $service
- * @param string $alias
- *
- * @return void
- */
- public function addService($service);
-
- /**
- * Factory method responsible for instantiating the correct sub type.
- *
- * @param string $tagLine The text for this tag, including description.
- * @param TypeContext $context
- *
- * @throws \InvalidArgumentException if an invalid tag line was presented.
- *
- * @return Tag A new tag object.
- */
- public function create($tagLine, TypeContext $context = null);
-
- /**
- * Registers a handler for tags.
- *
- * If you want to use your own tags then you can use this method to instruct the TagFactory to register the name
- * of a tag with the FQCN of a 'Tag Handler'. The Tag handler should implement the {@see Tag} interface (and thus
- * the create method).
- *
- * @param string $tagName Name of tag to register a handler for. When registering a namespaced tag, the full
- * name, along with a prefixing slash MUST be provided.
- * @param string $handler FQCN of handler.
- *
- * @throws \InvalidArgumentException if the tag name is not a string
- * @throws \InvalidArgumentException if the tag name is namespaced (contains backslashes) but does not start with
- * a backslash
- * @throws \InvalidArgumentException if the handler is not a string
- * @throws \InvalidArgumentException if the handler is not an existing class
- * @throws \InvalidArgumentException if the handler does not implement the {@see Tag} interface
- *
- * @return void
- */
- public function registerTagHandler($tagName, $handler);
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Author.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Author.php
deleted file mode 100644
index 29d7f1d..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Author.php
+++ /dev/null
@@ -1,100 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tags;
-
-use Webmozart\Assert\Assert;
-
-/**
- * Reflection class for an {@}author tag in a Docblock.
- */
-final class Author extends BaseTag implements Factory\StaticMethod
-{
- /** @var string register that this is the author tag. */
- protected $name = 'author';
-
- /** @var string The name of the author */
- private $authorName = '';
-
- /** @var string The email of the author */
- private $authorEmail = '';
-
- /**
- * Initializes this tag with the author name and e-mail.
- *
- * @param string $authorName
- * @param string $authorEmail
- */
- public function __construct($authorName, $authorEmail)
- {
- Assert::string($authorName);
- Assert::string($authorEmail);
- if ($authorEmail && !filter_var($authorEmail, FILTER_VALIDATE_EMAIL)) {
- throw new \InvalidArgumentException('The author tag does not have a valid e-mail address');
- }
-
- $this->authorName = $authorName;
- $this->authorEmail = $authorEmail;
- }
-
- /**
- * Gets the author's name.
- *
- * @return string The author's name.
- */
- public function getAuthorName()
- {
- return $this->authorName;
- }
-
- /**
- * Returns the author's email.
- *
- * @return string The author's email.
- */
- public function getEmail()
- {
- return $this->authorEmail;
- }
-
- /**
- * Returns this tag in string form.
- *
- * @return string
- */
- public function __toString()
- {
- return $this->authorName . (strlen($this->authorEmail) ? ' <' . $this->authorEmail . '>' : '');
- }
-
- /**
- * Attempts to create a new Author object based on †he tag body.
- *
- * @param string $body
- *
- * @return static
- */
- public static function create($body)
- {
- Assert::string($body);
-
- $splitTagContent = preg_match('/^([^\<]*)(?:\<([^\>]*)\>)?$/u', $body, $matches);
- if (!$splitTagContent) {
- return null;
- }
-
- $authorName = trim($matches[1]);
- $email = isset($matches[2]) ? trim($matches[2]) : '';
-
- return new static($authorName, $email);
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/BaseTag.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/BaseTag.php
deleted file mode 100644
index 14bb717..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/BaseTag.php
+++ /dev/null
@@ -1,52 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tags;
-
-use phpDocumentor\Reflection\DocBlock;
-use phpDocumentor\Reflection\DocBlock\Description;
-
-/**
- * Parses a tag definition for a DocBlock.
- */
-abstract class BaseTag implements DocBlock\Tag
-{
- /** @var string Name of the tag */
- protected $name = '';
-
- /** @var Description|null Description of the tag. */
- protected $description;
-
- /**
- * Gets the name of this tag.
- *
- * @return string The name of this tag.
- */
- public function getName()
- {
- return $this->name;
- }
-
- public function getDescription()
- {
- return $this->description;
- }
-
- public function render(Formatter $formatter = null)
- {
- if ($formatter === null) {
- $formatter = new Formatter\PassthroughFormatter();
- }
-
- return $formatter->format($this);
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Covers.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Covers.php
deleted file mode 100644
index 8d65403..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Covers.php
+++ /dev/null
@@ -1,83 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tags;
-
-use phpDocumentor\Reflection\DocBlock\Description;
-use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
-use phpDocumentor\Reflection\Fqsen;
-use phpDocumentor\Reflection\FqsenResolver;
-use phpDocumentor\Reflection\Types\Context as TypeContext;
-use Webmozart\Assert\Assert;
-
-/**
- * Reflection class for a @covers tag in a Docblock.
- */
-final class Covers extends BaseTag implements Factory\StaticMethod
-{
- protected $name = 'covers';
-
- /** @var Fqsen */
- private $refers = null;
-
- /**
- * Initializes this tag.
- *
- * @param Fqsen $refers
- * @param Description $description
- */
- public function __construct(Fqsen $refers, Description $description = null)
- {
- $this->refers = $refers;
- $this->description = $description;
- }
-
- /**
- * {@inheritdoc}
- */
- public static function create(
- $body,
- DescriptionFactory $descriptionFactory = null,
- FqsenResolver $resolver = null,
- TypeContext $context = null
- ) {
- Assert::string($body);
- Assert::notEmpty($body);
-
- $parts = preg_split('/\s+/Su', $body, 2);
-
- return new static(
- $resolver->resolve($parts[0], $context),
- $descriptionFactory->create(isset($parts[1]) ? $parts[1] : '', $context)
- );
- }
-
- /**
- * Returns the structural element this tag refers to.
- *
- * @return Fqsen
- */
- public function getReference()
- {
- return $this->refers;
- }
-
- /**
- * Returns a string representation of this tag.
- *
- * @return string
- */
- public function __toString()
- {
- return $this->refers . ($this->description ? ' ' . $this->description->render() : '');
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Deprecated.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Deprecated.php
deleted file mode 100644
index 822c305..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Deprecated.php
+++ /dev/null
@@ -1,97 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tags;
-
-use phpDocumentor\Reflection\DocBlock\Description;
-use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
-use phpDocumentor\Reflection\Types\Context as TypeContext;
-use Webmozart\Assert\Assert;
-
-/**
- * Reflection class for a {@}deprecated tag in a Docblock.
- */
-final class Deprecated extends BaseTag implements Factory\StaticMethod
-{
- protected $name = 'deprecated';
-
- /**
- * PCRE regular expression matching a version vector.
- * Assumes the "x" modifier.
- */
- const REGEX_VECTOR = '(?:
- # Normal release vectors.
- \d\S*
- |
- # VCS version vectors. Per PHPCS, they are expected to
- # follow the form of the VCS name, followed by ":", followed
- # by the version vector itself.
- # By convention, popular VCSes like CVS, SVN and GIT use "$"
- # around the actual version vector.
- [^\s\:]+\:\s*\$[^\$]+\$
- )';
-
- /** @var string The version vector. */
- private $version = '';
-
- public function __construct($version = null, Description $description = null)
- {
- Assert::nullOrStringNotEmpty($version);
-
- $this->version = $version;
- $this->description = $description;
- }
-
- /**
- * @return static
- */
- public static function create($body, DescriptionFactory $descriptionFactory = null, TypeContext $context = null)
- {
- Assert::nullOrString($body);
- if (empty($body)) {
- return new static();
- }
-
- $matches = [];
- if (!preg_match('/^(' . self::REGEX_VECTOR . ')\s*(.+)?$/sux', $body, $matches)) {
- return new static(
- null,
- null !== $descriptionFactory ? $descriptionFactory->create($body, $context) : null
- );
- }
-
- return new static(
- $matches[1],
- $descriptionFactory->create(isset($matches[2]) ? $matches[2] : '', $context)
- );
- }
-
- /**
- * Gets the version section of the tag.
- *
- * @return string
- */
- public function getVersion()
- {
- return $this->version;
- }
-
- /**
- * Returns a string representation for this tag.
- *
- * @return string
- */
- public function __toString()
- {
- return $this->version . ($this->description ? ' ' . $this->description->render() : '');
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Example.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Example.php
deleted file mode 100644
index ecb199b..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Example.php
+++ /dev/null
@@ -1,176 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tags;
-
-use phpDocumentor\Reflection\DocBlock\Description;
-use phpDocumentor\Reflection\DocBlock\Tag;
-use Webmozart\Assert\Assert;
-
-/**
- * Reflection class for a {@}example tag in a Docblock.
- */
-final class Example extends BaseTag
-{
- /**
- * @var string Path to a file to use as an example. May also be an absolute URI.
- */
- private $filePath;
-
- /**
- * @var bool Whether the file path component represents an URI. This determines how the file portion
- * appears at {@link getContent()}.
- */
- private $isURI = false;
-
- /**
- * @var int
- */
- private $startingLine;
-
- /**
- * @var int
- */
- private $lineCount;
-
- public function __construct($filePath, $isURI, $startingLine, $lineCount, $description)
- {
- Assert::notEmpty($filePath);
- Assert::integer($startingLine);
- Assert::greaterThanEq($startingLine, 0);
-
- $this->filePath = $filePath;
- $this->startingLine = $startingLine;
- $this->lineCount = $lineCount;
- $this->name = 'example';
- if ($description !== null) {
- $this->description = trim($description);
- }
-
- $this->isURI = $isURI;
- }
-
- /**
- * {@inheritdoc}
- */
- public function getContent()
- {
- if (null === $this->description) {
- $filePath = '"' . $this->filePath . '"';
- if ($this->isURI) {
- $filePath = $this->isUriRelative($this->filePath)
- ? str_replace('%2F', '/', rawurlencode($this->filePath))
- :$this->filePath;
- }
-
- return trim($filePath . ' ' . parent::getDescription());
- }
-
- return $this->description;
- }
-
- /**
- * {@inheritdoc}
- */
- public static function create($body)
- {
- // File component: File path in quotes or File URI / Source information
- if (! preg_match('/^(?:\"([^\"]+)\"|(\S+))(?:\s+(.*))?$/sux', $body, $matches)) {
- return null;
- }
-
- $filePath = null;
- $fileUri = null;
- if ('' !== $matches[1]) {
- $filePath = $matches[1];
- } else {
- $fileUri = $matches[2];
- }
-
- $startingLine = 1;
- $lineCount = null;
- $description = null;
-
- if (array_key_exists(3, $matches)) {
- $description = $matches[3];
-
- // Starting line / Number of lines / Description
- if (preg_match('/^([1-9]\d*)(?:\s+((?1))\s*)?(.*)$/sux', $matches[3], $contentMatches)) {
- $startingLine = (int)$contentMatches[1];
- if (isset($contentMatches[2]) && $contentMatches[2] !== '') {
- $lineCount = (int)$contentMatches[2];
- }
-
- if (array_key_exists(3, $contentMatches)) {
- $description = $contentMatches[3];
- }
- }
- }
-
- return new static(
- $filePath !== null?$filePath:$fileUri,
- $fileUri !== null,
- $startingLine,
- $lineCount,
- $description
- );
- }
-
- /**
- * Returns the file path.
- *
- * @return string Path to a file to use as an example.
- * May also be an absolute URI.
- */
- public function getFilePath()
- {
- return $this->filePath;
- }
-
- /**
- * Returns a string representation for this tag.
- *
- * @return string
- */
- public function __toString()
- {
- return $this->filePath . ($this->description ? ' ' . $this->description : '');
- }
-
- /**
- * Returns true if the provided URI is relative or contains a complete scheme (and thus is absolute).
- *
- * @param string $uri
- *
- * @return bool
- */
- private function isUriRelative($uri)
- {
- return false === strpos($uri, ':');
- }
-
- /**
- * @return int
- */
- public function getStartingLine()
- {
- return $this->startingLine;
- }
-
- /**
- * @return int
- */
- public function getLineCount()
- {
- return $this->lineCount;
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/StaticMethod.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/StaticMethod.php
deleted file mode 100644
index 98aea45..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/StaticMethod.php
+++ /dev/null
@@ -1,18 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tags\Factory;
-
-interface StaticMethod
-{
- public static function create($body);
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/Strategy.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/Strategy.php
deleted file mode 100644
index b9ca0b8..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Factory/Strategy.php
+++ /dev/null
@@ -1,18 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tags\Factory;
-
-interface Strategy
-{
- public function create($body);
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter.php
deleted file mode 100644
index 64b2c60..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter.php
+++ /dev/null
@@ -1,27 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tags;
-
-use phpDocumentor\Reflection\DocBlock\Tag;
-
-interface Formatter
-{
- /**
- * Formats a tag into a string representation according to a specific format, such as Markdown.
- *
- * @param Tag $tag
- *
- * @return string
- */
- public function format(Tag $tag);
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter/AlignFormatter.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter/AlignFormatter.php
deleted file mode 100644
index ceb40cc..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter/AlignFormatter.php
+++ /dev/null
@@ -1,47 +0,0 @@
-
- * @copyright 2017 Mike van Riel
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tags\Formatter;
-
-use phpDocumentor\Reflection\DocBlock\Tag;
-use phpDocumentor\Reflection\DocBlock\Tags\Formatter;
-
-class AlignFormatter implements Formatter
-{
- /** @var int The maximum tag name length. */
- protected $maxLen = 0;
-
- /**
- * Constructor.
- *
- * @param Tag[] $tags All tags that should later be aligned with the formatter.
- */
- public function __construct(array $tags)
- {
- foreach ($tags as $tag) {
- $this->maxLen = max($this->maxLen, strlen($tag->getName()));
- }
- }
-
- /**
- * Formats the given tag to return a simple plain text version.
- *
- * @param Tag $tag
- *
- * @return string
- */
- public function format(Tag $tag)
- {
- return '@' . $tag->getName() . str_repeat(' ', $this->maxLen - strlen($tag->getName()) + 1) . (string)$tag;
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter/PassthroughFormatter.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter/PassthroughFormatter.php
deleted file mode 100644
index 4e2c576..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Formatter/PassthroughFormatter.php
+++ /dev/null
@@ -1,31 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tags\Formatter;
-
-use phpDocumentor\Reflection\DocBlock\Tag;
-use phpDocumentor\Reflection\DocBlock\Tags\Formatter;
-
-class PassthroughFormatter implements Formatter
-{
- /**
- * Formats the given tag to return a simple plain text version.
- *
- * @param Tag $tag
- *
- * @return string
- */
- public function format(Tag $tag)
- {
- return trim('@' . $tag->getName() . ' ' . (string)$tag);
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Generic.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Generic.php
deleted file mode 100644
index 88b4ebf..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Generic.php
+++ /dev/null
@@ -1,91 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tags;
-
-use phpDocumentor\Reflection\DocBlock\Description;
-use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
-use phpDocumentor\Reflection\DocBlock\StandardTagFactory;
-use phpDocumentor\Reflection\Types\Context as TypeContext;
-use Webmozart\Assert\Assert;
-
-/**
- * Parses a tag definition for a DocBlock.
- */
-class Generic extends BaseTag implements Factory\StaticMethod
-{
- /**
- * Parses a tag and populates the member variables.
- *
- * @param string $name Name of the tag.
- * @param Description $description The contents of the given tag.
- */
- public function __construct($name, Description $description = null)
- {
- $this->validateTagName($name);
-
- $this->name = $name;
- $this->description = $description;
- }
-
- /**
- * Creates a new tag that represents any unknown tag type.
- *
- * @param string $body
- * @param string $name
- * @param DescriptionFactory $descriptionFactory
- * @param TypeContext $context
- *
- * @return static
- */
- public static function create(
- $body,
- $name = '',
- DescriptionFactory $descriptionFactory = null,
- TypeContext $context = null
- ) {
- Assert::string($body);
- Assert::stringNotEmpty($name);
- Assert::notNull($descriptionFactory);
-
- $description = $descriptionFactory && $body !== "" ? $descriptionFactory->create($body, $context) : null;
-
- return new static($name, $description);
- }
-
- /**
- * Returns the tag as a serialized string
- *
- * @return string
- */
- public function __toString()
- {
- return ($this->description ? $this->description->render() : '');
- }
-
- /**
- * Validates if the tag name matches the expected format, otherwise throws an exception.
- *
- * @param string $name
- *
- * @return void
- */
- private function validateTagName($name)
- {
- if (! preg_match('/^' . StandardTagFactory::REGEX_TAGNAME . '$/u', $name)) {
- throw new \InvalidArgumentException(
- 'The tag name "' . $name . '" is not wellformed. Tags may only consist of letters, underscores, '
- . 'hyphens and backslashes.'
- );
- }
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Link.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Link.php
deleted file mode 100644
index 9c0e367..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Link.php
+++ /dev/null
@@ -1,77 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tags;
-
-use phpDocumentor\Reflection\DocBlock\Description;
-use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
-use phpDocumentor\Reflection\Types\Context as TypeContext;
-use Webmozart\Assert\Assert;
-
-/**
- * Reflection class for a @link tag in a Docblock.
- */
-final class Link extends BaseTag implements Factory\StaticMethod
-{
- protected $name = 'link';
-
- /** @var string */
- private $link = '';
-
- /**
- * Initializes a link to a URL.
- *
- * @param string $link
- * @param Description $description
- */
- public function __construct($link, Description $description = null)
- {
- Assert::string($link);
-
- $this->link = $link;
- $this->description = $description;
- }
-
- /**
- * {@inheritdoc}
- */
- public static function create($body, DescriptionFactory $descriptionFactory = null, TypeContext $context = null)
- {
- Assert::string($body);
- Assert::notNull($descriptionFactory);
-
- $parts = preg_split('/\s+/Su', $body, 2);
- $description = isset($parts[1]) ? $descriptionFactory->create($parts[1], $context) : null;
-
- return new static($parts[0], $description);
- }
-
- /**
- * Gets the link
- *
- * @return string
- */
- public function getLink()
- {
- return $this->link;
- }
-
- /**
- * Returns a string representation for this tag.
- *
- * @return string
- */
- public function __toString()
- {
- return $this->link . ($this->description ? ' ' . $this->description->render() : '');
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Method.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Method.php
deleted file mode 100644
index 7522529..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Method.php
+++ /dev/null
@@ -1,242 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tags;
-
-use phpDocumentor\Reflection\DocBlock\Description;
-use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
-use phpDocumentor\Reflection\Type;
-use phpDocumentor\Reflection\TypeResolver;
-use phpDocumentor\Reflection\Types\Context as TypeContext;
-use phpDocumentor\Reflection\Types\Void_;
-use Webmozart\Assert\Assert;
-
-/**
- * Reflection class for an {@}method in a Docblock.
- */
-final class Method extends BaseTag implements Factory\StaticMethod
-{
- protected $name = 'method';
-
- /** @var string */
- private $methodName = '';
-
- /** @var string[] */
- private $arguments = [];
-
- /** @var bool */
- private $isStatic = false;
-
- /** @var Type */
- private $returnType;
-
- public function __construct(
- $methodName,
- array $arguments = [],
- Type $returnType = null,
- $static = false,
- Description $description = null
- ) {
- Assert::stringNotEmpty($methodName);
- Assert::boolean($static);
-
- if ($returnType === null) {
- $returnType = new Void_();
- }
-
- $this->methodName = $methodName;
- $this->arguments = $this->filterArguments($arguments);
- $this->returnType = $returnType;
- $this->isStatic = $static;
- $this->description = $description;
- }
-
- /**
- * {@inheritdoc}
- */
- public static function create(
- $body,
- TypeResolver $typeResolver = null,
- DescriptionFactory $descriptionFactory = null,
- TypeContext $context = null
- ) {
- Assert::stringNotEmpty($body);
- Assert::allNotNull([ $typeResolver, $descriptionFactory ]);
-
- // 1. none or more whitespace
- // 2. optionally the keyword "static" followed by whitespace
- // 3. optionally a word with underscores followed by whitespace : as
- // type for the return value
- // 4. then optionally a word with underscores followed by () and
- // whitespace : as method name as used by phpDocumentor
- // 5. then a word with underscores, followed by ( and any character
- // until a ) and whitespace : as method name with signature
- // 6. any remaining text : as description
- if (!preg_match(
- '/^
- # Static keyword
- # Declares a static method ONLY if type is also present
- (?:
- (static)
- \s+
- )?
- # Return type
- (?:
- (
- (?:[\w\|_\\\\]*\$this[\w\|_\\\\]*)
- |
- (?:
- (?:[\w\|_\\\\]+)
- # array notation
- (?:\[\])*
- )*
- )
- \s+
- )?
- # Legacy method name (not captured)
- (?:
- [\w_]+\(\)\s+
- )?
- # Method name
- ([\w\|_\\\\]+)
- # Arguments
- (?:
- \(([^\)]*)\)
- )?
- \s*
- # Description
- (.*)
- $/sux',
- $body,
- $matches
- )) {
- return null;
- }
-
- list(, $static, $returnType, $methodName, $arguments, $description) = $matches;
-
- $static = $static === 'static';
-
- if ($returnType === '') {
- $returnType = 'void';
- }
-
- $returnType = $typeResolver->resolve($returnType, $context);
- $description = $descriptionFactory->create($description, $context);
-
- if (is_string($arguments) && strlen($arguments) > 0) {
- $arguments = explode(',', $arguments);
- foreach ($arguments as &$argument) {
- $argument = explode(' ', self::stripRestArg(trim($argument)), 2);
- if ($argument[0][0] === '$') {
- $argumentName = substr($argument[0], 1);
- $argumentType = new Void_();
- } else {
- $argumentType = $typeResolver->resolve($argument[0], $context);
- $argumentName = '';
- if (isset($argument[1])) {
- $argument[1] = self::stripRestArg($argument[1]);
- $argumentName = substr($argument[1], 1);
- }
- }
-
- $argument = [ 'name' => $argumentName, 'type' => $argumentType];
- }
- } else {
- $arguments = [];
- }
-
- return new static($methodName, $arguments, $returnType, $static, $description);
- }
-
- /**
- * Retrieves the method name.
- *
- * @return string
- */
- public function getMethodName()
- {
- return $this->methodName;
- }
-
- /**
- * @return string[]
- */
- public function getArguments()
- {
- return $this->arguments;
- }
-
- /**
- * Checks whether the method tag describes a static method or not.
- *
- * @return bool TRUE if the method declaration is for a static method, FALSE otherwise.
- */
- public function isStatic()
- {
- return $this->isStatic;
- }
-
- /**
- * @return Type
- */
- public function getReturnType()
- {
- return $this->returnType;
- }
-
- public function __toString()
- {
- $arguments = [];
- foreach ($this->arguments as $argument) {
- $arguments[] = $argument['type'] . ' $' . $argument['name'];
- }
-
- return trim(($this->isStatic() ? 'static ' : '')
- . (string)$this->returnType . ' '
- . $this->methodName
- . '(' . implode(', ', $arguments) . ')'
- . ($this->description ? ' ' . $this->description->render() : ''));
- }
-
- private function filterArguments($arguments)
- {
- foreach ($arguments as &$argument) {
- if (is_string($argument)) {
- $argument = [ 'name' => $argument ];
- }
-
- if (! isset($argument['type'])) {
- $argument['type'] = new Void_();
- }
-
- $keys = array_keys($argument);
- sort($keys);
- if ($keys !== [ 'name', 'type' ]) {
- throw new \InvalidArgumentException(
- 'Arguments can only have the "name" and "type" fields, found: ' . var_export($keys, true)
- );
- }
- }
-
- return $arguments;
- }
-
- private static function stripRestArg($argument)
- {
- if (strpos($argument, '...') === 0) {
- $argument = trim(substr($argument, 3));
- }
-
- return $argument;
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Param.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Param.php
deleted file mode 100644
index 7d699d8..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Param.php
+++ /dev/null
@@ -1,141 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tags;
-
-use phpDocumentor\Reflection\DocBlock\Description;
-use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
-use phpDocumentor\Reflection\Type;
-use phpDocumentor\Reflection\TypeResolver;
-use phpDocumentor\Reflection\Types\Context as TypeContext;
-use Webmozart\Assert\Assert;
-
-/**
- * Reflection class for the {@}param tag in a Docblock.
- */
-final class Param extends BaseTag implements Factory\StaticMethod
-{
- /** @var string */
- protected $name = 'param';
-
- /** @var Type */
- private $type;
-
- /** @var string */
- private $variableName = '';
-
- /** @var bool determines whether this is a variadic argument */
- private $isVariadic = false;
-
- /**
- * @param string $variableName
- * @param Type $type
- * @param bool $isVariadic
- * @param Description $description
- */
- public function __construct($variableName, Type $type = null, $isVariadic = false, Description $description = null)
- {
- Assert::string($variableName);
- Assert::boolean($isVariadic);
-
- $this->variableName = $variableName;
- $this->type = $type;
- $this->isVariadic = $isVariadic;
- $this->description = $description;
- }
-
- /**
- * {@inheritdoc}
- */
- public static function create(
- $body,
- TypeResolver $typeResolver = null,
- DescriptionFactory $descriptionFactory = null,
- TypeContext $context = null
- ) {
- Assert::stringNotEmpty($body);
- Assert::allNotNull([$typeResolver, $descriptionFactory]);
-
- $parts = preg_split('/(\s+)/Su', $body, 3, PREG_SPLIT_DELIM_CAPTURE);
- $type = null;
- $variableName = '';
- $isVariadic = false;
-
- // if the first item that is encountered is not a variable; it is a type
- if (isset($parts[0]) && (strlen($parts[0]) > 0) && ($parts[0][0] !== '$')) {
- $type = $typeResolver->resolve(array_shift($parts), $context);
- array_shift($parts);
- }
-
- // if the next item starts with a $ or ...$ it must be the variable name
- if (isset($parts[0]) && (strlen($parts[0]) > 0) && ($parts[0][0] === '$' || substr($parts[0], 0, 4) === '...$')) {
- $variableName = array_shift($parts);
- array_shift($parts);
-
- if (substr($variableName, 0, 3) === '...') {
- $isVariadic = true;
- $variableName = substr($variableName, 3);
- }
-
- if (substr($variableName, 0, 1) === '$') {
- $variableName = substr($variableName, 1);
- }
- }
-
- $description = $descriptionFactory->create(implode('', $parts), $context);
-
- return new static($variableName, $type, $isVariadic, $description);
- }
-
- /**
- * Returns the variable's name.
- *
- * @return string
- */
- public function getVariableName()
- {
- return $this->variableName;
- }
-
- /**
- * Returns the variable's type or null if unknown.
- *
- * @return Type|null
- */
- public function getType()
- {
- return $this->type;
- }
-
- /**
- * Returns whether this tag is variadic.
- *
- * @return boolean
- */
- public function isVariadic()
- {
- return $this->isVariadic;
- }
-
- /**
- * Returns a string representation for this tag.
- *
- * @return string
- */
- public function __toString()
- {
- return ($this->type ? $this->type . ' ' : '')
- . ($this->isVariadic() ? '...' : '')
- . '$' . $this->variableName
- . ($this->description ? ' ' . $this->description : '');
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Property.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Property.php
deleted file mode 100644
index f0ef7c0..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Property.php
+++ /dev/null
@@ -1,118 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tags;
-
-use phpDocumentor\Reflection\DocBlock\Description;
-use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
-use phpDocumentor\Reflection\Type;
-use phpDocumentor\Reflection\TypeResolver;
-use phpDocumentor\Reflection\Types\Context as TypeContext;
-use Webmozart\Assert\Assert;
-
-/**
- * Reflection class for a {@}property tag in a Docblock.
- */
-class Property extends BaseTag implements Factory\StaticMethod
-{
- /** @var string */
- protected $name = 'property';
-
- /** @var Type */
- private $type;
-
- /** @var string */
- protected $variableName = '';
-
- /**
- * @param string $variableName
- * @param Type $type
- * @param Description $description
- */
- public function __construct($variableName, Type $type = null, Description $description = null)
- {
- Assert::string($variableName);
-
- $this->variableName = $variableName;
- $this->type = $type;
- $this->description = $description;
- }
-
- /**
- * {@inheritdoc}
- */
- public static function create(
- $body,
- TypeResolver $typeResolver = null,
- DescriptionFactory $descriptionFactory = null,
- TypeContext $context = null
- ) {
- Assert::stringNotEmpty($body);
- Assert::allNotNull([$typeResolver, $descriptionFactory]);
-
- $parts = preg_split('/(\s+)/Su', $body, 3, PREG_SPLIT_DELIM_CAPTURE);
- $type = null;
- $variableName = '';
-
- // if the first item that is encountered is not a variable; it is a type
- if (isset($parts[0]) && (strlen($parts[0]) > 0) && ($parts[0][0] !== '$')) {
- $type = $typeResolver->resolve(array_shift($parts), $context);
- array_shift($parts);
- }
-
- // if the next item starts with a $ or ...$ it must be the variable name
- if (isset($parts[0]) && (strlen($parts[0]) > 0) && ($parts[0][0] === '$')) {
- $variableName = array_shift($parts);
- array_shift($parts);
-
- if (substr($variableName, 0, 1) === '$') {
- $variableName = substr($variableName, 1);
- }
- }
-
- $description = $descriptionFactory->create(implode('', $parts), $context);
-
- return new static($variableName, $type, $description);
- }
-
- /**
- * Returns the variable's name.
- *
- * @return string
- */
- public function getVariableName()
- {
- return $this->variableName;
- }
-
- /**
- * Returns the variable's type or null if unknown.
- *
- * @return Type|null
- */
- public function getType()
- {
- return $this->type;
- }
-
- /**
- * Returns a string representation for this tag.
- *
- * @return string
- */
- public function __toString()
- {
- return ($this->type ? $this->type . ' ' : '')
- . '$' . $this->variableName
- . ($this->description ? ' ' . $this->description : '');
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyRead.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyRead.php
deleted file mode 100644
index e41c0c1..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyRead.php
+++ /dev/null
@@ -1,118 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tags;
-
-use phpDocumentor\Reflection\DocBlock\Description;
-use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
-use phpDocumentor\Reflection\Type;
-use phpDocumentor\Reflection\TypeResolver;
-use phpDocumentor\Reflection\Types\Context as TypeContext;
-use Webmozart\Assert\Assert;
-
-/**
- * Reflection class for a {@}property-read tag in a Docblock.
- */
-class PropertyRead extends BaseTag implements Factory\StaticMethod
-{
- /** @var string */
- protected $name = 'property-read';
-
- /** @var Type */
- private $type;
-
- /** @var string */
- protected $variableName = '';
-
- /**
- * @param string $variableName
- * @param Type $type
- * @param Description $description
- */
- public function __construct($variableName, Type $type = null, Description $description = null)
- {
- Assert::string($variableName);
-
- $this->variableName = $variableName;
- $this->type = $type;
- $this->description = $description;
- }
-
- /**
- * {@inheritdoc}
- */
- public static function create(
- $body,
- TypeResolver $typeResolver = null,
- DescriptionFactory $descriptionFactory = null,
- TypeContext $context = null
- ) {
- Assert::stringNotEmpty($body);
- Assert::allNotNull([$typeResolver, $descriptionFactory]);
-
- $parts = preg_split('/(\s+)/Su', $body, 3, PREG_SPLIT_DELIM_CAPTURE);
- $type = null;
- $variableName = '';
-
- // if the first item that is encountered is not a variable; it is a type
- if (isset($parts[0]) && (strlen($parts[0]) > 0) && ($parts[0][0] !== '$')) {
- $type = $typeResolver->resolve(array_shift($parts), $context);
- array_shift($parts);
- }
-
- // if the next item starts with a $ or ...$ it must be the variable name
- if (isset($parts[0]) && (strlen($parts[0]) > 0) && ($parts[0][0] === '$')) {
- $variableName = array_shift($parts);
- array_shift($parts);
-
- if (substr($variableName, 0, 1) === '$') {
- $variableName = substr($variableName, 1);
- }
- }
-
- $description = $descriptionFactory->create(implode('', $parts), $context);
-
- return new static($variableName, $type, $description);
- }
-
- /**
- * Returns the variable's name.
- *
- * @return string
- */
- public function getVariableName()
- {
- return $this->variableName;
- }
-
- /**
- * Returns the variable's type or null if unknown.
- *
- * @return Type|null
- */
- public function getType()
- {
- return $this->type;
- }
-
- /**
- * Returns a string representation for this tag.
- *
- * @return string
- */
- public function __toString()
- {
- return ($this->type ? $this->type . ' ' : '')
- . '$' . $this->variableName
- . ($this->description ? ' ' . $this->description : '');
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyWrite.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyWrite.php
deleted file mode 100644
index cfdb0ed..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyWrite.php
+++ /dev/null
@@ -1,118 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tags;
-
-use phpDocumentor\Reflection\DocBlock\Description;
-use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
-use phpDocumentor\Reflection\Type;
-use phpDocumentor\Reflection\TypeResolver;
-use phpDocumentor\Reflection\Types\Context as TypeContext;
-use Webmozart\Assert\Assert;
-
-/**
- * Reflection class for a {@}property-write tag in a Docblock.
- */
-class PropertyWrite extends BaseTag implements Factory\StaticMethod
-{
- /** @var string */
- protected $name = 'property-write';
-
- /** @var Type */
- private $type;
-
- /** @var string */
- protected $variableName = '';
-
- /**
- * @param string $variableName
- * @param Type $type
- * @param Description $description
- */
- public function __construct($variableName, Type $type = null, Description $description = null)
- {
- Assert::string($variableName);
-
- $this->variableName = $variableName;
- $this->type = $type;
- $this->description = $description;
- }
-
- /**
- * {@inheritdoc}
- */
- public static function create(
- $body,
- TypeResolver $typeResolver = null,
- DescriptionFactory $descriptionFactory = null,
- TypeContext $context = null
- ) {
- Assert::stringNotEmpty($body);
- Assert::allNotNull([$typeResolver, $descriptionFactory]);
-
- $parts = preg_split('/(\s+)/Su', $body, 3, PREG_SPLIT_DELIM_CAPTURE);
- $type = null;
- $variableName = '';
-
- // if the first item that is encountered is not a variable; it is a type
- if (isset($parts[0]) && (strlen($parts[0]) > 0) && ($parts[0][0] !== '$')) {
- $type = $typeResolver->resolve(array_shift($parts), $context);
- array_shift($parts);
- }
-
- // if the next item starts with a $ or ...$ it must be the variable name
- if (isset($parts[0]) && (strlen($parts[0]) > 0) && ($parts[0][0] === '$')) {
- $variableName = array_shift($parts);
- array_shift($parts);
-
- if (substr($variableName, 0, 1) === '$') {
- $variableName = substr($variableName, 1);
- }
- }
-
- $description = $descriptionFactory->create(implode('', $parts), $context);
-
- return new static($variableName, $type, $description);
- }
-
- /**
- * Returns the variable's name.
- *
- * @return string
- */
- public function getVariableName()
- {
- return $this->variableName;
- }
-
- /**
- * Returns the variable's type or null if unknown.
- *
- * @return Type|null
- */
- public function getType()
- {
- return $this->type;
- }
-
- /**
- * Returns a string representation for this tag.
- *
- * @return string
- */
- public function __toString()
- {
- return ($this->type ? $this->type . ' ' : '')
- . '$' . $this->variableName
- . ($this->description ? ' ' . $this->description : '');
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Fqsen.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Fqsen.php
deleted file mode 100644
index dc7b8b6..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Fqsen.php
+++ /dev/null
@@ -1,42 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tags\Reference;
-
-use phpDocumentor\Reflection\Fqsen as RealFqsen;
-
-/**
- * Fqsen reference used by {@see phpDocumentor\Reflection\DocBlock\Tags\See}
- */
-final class Fqsen implements Reference
-{
- /**
- * @var RealFqsen
- */
- private $fqsen;
-
- /**
- * Fqsen constructor.
- */
- public function __construct(RealFqsen $fqsen)
- {
- $this->fqsen = $fqsen;
- }
-
- /**
- * @return string string representation of the referenced fqsen
- */
- public function __toString()
- {
- return (string)$this->fqsen;
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Reference.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Reference.php
deleted file mode 100644
index a3ffd24..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Reference.php
+++ /dev/null
@@ -1,21 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tags\Reference;
-
-/**
- * Interface for references in {@see phpDocumentor\Reflection\DocBlock\Tags\See}
- */
-interface Reference
-{
- public function __toString();
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Url.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Url.php
deleted file mode 100644
index 2671d5e..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Url.php
+++ /dev/null
@@ -1,40 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tags\Reference;
-
-use Webmozart\Assert\Assert;
-
-/**
- * Url reference used by {@see phpDocumentor\Reflection\DocBlock\Tags\See}
- */
-final class Url implements Reference
-{
- /**
- * @var string
- */
- private $uri;
-
- /**
- * Url constructor.
- */
- public function __construct($uri)
- {
- Assert::stringNotEmpty($uri);
- $this->uri = $uri;
- }
-
- public function __toString()
- {
- return $this->uri;
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Return_.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Return_.php
deleted file mode 100644
index ca5bda7..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Return_.php
+++ /dev/null
@@ -1,72 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tags;
-
-use phpDocumentor\Reflection\DocBlock\Description;
-use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
-use phpDocumentor\Reflection\Type;
-use phpDocumentor\Reflection\TypeResolver;
-use phpDocumentor\Reflection\Types\Context as TypeContext;
-use Webmozart\Assert\Assert;
-
-/**
- * Reflection class for a {@}return tag in a Docblock.
- */
-final class Return_ extends BaseTag implements Factory\StaticMethod
-{
- protected $name = 'return';
-
- /** @var Type */
- private $type;
-
- public function __construct(Type $type, Description $description = null)
- {
- $this->type = $type;
- $this->description = $description;
- }
-
- /**
- * {@inheritdoc}
- */
- public static function create(
- $body,
- TypeResolver $typeResolver = null,
- DescriptionFactory $descriptionFactory = null,
- TypeContext $context = null
- ) {
- Assert::string($body);
- Assert::allNotNull([$typeResolver, $descriptionFactory]);
-
- $parts = preg_split('/\s+/Su', $body, 2);
-
- $type = $typeResolver->resolve(isset($parts[0]) ? $parts[0] : '', $context);
- $description = $descriptionFactory->create(isset($parts[1]) ? $parts[1] : '', $context);
-
- return new static($type, $description);
- }
-
- /**
- * Returns the type section of the variable.
- *
- * @return Type
- */
- public function getType()
- {
- return $this->type;
- }
-
- public function __toString()
- {
- return $this->type . ' ' . $this->description;
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/See.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/See.php
deleted file mode 100644
index 9e9e723..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/See.php
+++ /dev/null
@@ -1,88 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tags;
-
-use phpDocumentor\Reflection\DocBlock\Description;
-use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
-use phpDocumentor\Reflection\DocBlock\Tags\Reference\Fqsen as FqsenRef;
-use phpDocumentor\Reflection\DocBlock\Tags\Reference\Reference;
-use phpDocumentor\Reflection\DocBlock\Tags\Reference\Url;
-use phpDocumentor\Reflection\FqsenResolver;
-use phpDocumentor\Reflection\Types\Context as TypeContext;
-use Webmozart\Assert\Assert;
-
-/**
- * Reflection class for an {@}see tag in a Docblock.
- */
-class See extends BaseTag implements Factory\StaticMethod
-{
- protected $name = 'see';
-
- /** @var Reference */
- protected $refers = null;
-
- /**
- * Initializes this tag.
- *
- * @param Reference $refers
- * @param Description $description
- */
- public function __construct(Reference $refers, Description $description = null)
- {
- $this->refers = $refers;
- $this->description = $description;
- }
-
- /**
- * {@inheritdoc}
- */
- public static function create(
- $body,
- FqsenResolver $resolver = null,
- DescriptionFactory $descriptionFactory = null,
- TypeContext $context = null
- ) {
- Assert::string($body);
- Assert::allNotNull([$resolver, $descriptionFactory]);
-
- $parts = preg_split('/\s+/Su', $body, 2);
- $description = isset($parts[1]) ? $descriptionFactory->create($parts[1], $context) : null;
-
- // https://tools.ietf.org/html/rfc2396#section-3
- if (preg_match('/\w:\/\/\w/i', $parts[0])) {
- return new static(new Url($parts[0]), $description);
- }
-
- return new static(new FqsenRef($resolver->resolve($parts[0], $context)), $description);
- }
-
- /**
- * Returns the ref of this tag.
- *
- * @return Reference
- */
- public function getReference()
- {
- return $this->refers;
- }
-
- /**
- * Returns a string representation of this tag.
- *
- * @return string
- */
- public function __toString()
- {
- return $this->refers . ($this->description ? ' ' . $this->description->render() : '');
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Since.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Since.php
deleted file mode 100644
index 835fb0d..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Since.php
+++ /dev/null
@@ -1,94 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tags;
-
-use phpDocumentor\Reflection\DocBlock\Description;
-use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
-use phpDocumentor\Reflection\Types\Context as TypeContext;
-use Webmozart\Assert\Assert;
-
-/**
- * Reflection class for a {@}since tag in a Docblock.
- */
-final class Since extends BaseTag implements Factory\StaticMethod
-{
- protected $name = 'since';
-
- /**
- * PCRE regular expression matching a version vector.
- * Assumes the "x" modifier.
- */
- const REGEX_VECTOR = '(?:
- # Normal release vectors.
- \d\S*
- |
- # VCS version vectors. Per PHPCS, they are expected to
- # follow the form of the VCS name, followed by ":", followed
- # by the version vector itself.
- # By convention, popular VCSes like CVS, SVN and GIT use "$"
- # around the actual version vector.
- [^\s\:]+\:\s*\$[^\$]+\$
- )';
-
- /** @var string The version vector. */
- private $version = '';
-
- public function __construct($version = null, Description $description = null)
- {
- Assert::nullOrStringNotEmpty($version);
-
- $this->version = $version;
- $this->description = $description;
- }
-
- /**
- * @return static
- */
- public static function create($body, DescriptionFactory $descriptionFactory = null, TypeContext $context = null)
- {
- Assert::nullOrString($body);
- if (empty($body)) {
- return new static();
- }
-
- $matches = [];
- if (! preg_match('/^(' . self::REGEX_VECTOR . ')\s*(.+)?$/sux', $body, $matches)) {
- return null;
- }
-
- return new static(
- $matches[1],
- $descriptionFactory->create(isset($matches[2]) ? $matches[2] : '', $context)
- );
- }
-
- /**
- * Gets the version section of the tag.
- *
- * @return string
- */
- public function getVersion()
- {
- return $this->version;
- }
-
- /**
- * Returns a string representation for this tag.
- *
- * @return string
- */
- public function __toString()
- {
- return $this->version . ($this->description ? ' ' . $this->description->render() : '');
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Source.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Source.php
deleted file mode 100644
index 247b1b3..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Source.php
+++ /dev/null
@@ -1,97 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tags;
-
-use phpDocumentor\Reflection\DocBlock\Description;
-use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
-use phpDocumentor\Reflection\Types\Context as TypeContext;
-use Webmozart\Assert\Assert;
-
-/**
- * Reflection class for a {@}source tag in a Docblock.
- */
-final class Source extends BaseTag implements Factory\StaticMethod
-{
- /** @var string */
- protected $name = 'source';
-
- /** @var int The starting line, relative to the structural element's location. */
- private $startingLine = 1;
-
- /** @var int|null The number of lines, relative to the starting line. NULL means "to the end". */
- private $lineCount = null;
-
- public function __construct($startingLine, $lineCount = null, Description $description = null)
- {
- Assert::integerish($startingLine);
- Assert::nullOrIntegerish($lineCount);
-
- $this->startingLine = (int)$startingLine;
- $this->lineCount = $lineCount !== null ? (int)$lineCount : null;
- $this->description = $description;
- }
-
- /**
- * {@inheritdoc}
- */
- public static function create($body, DescriptionFactory $descriptionFactory = null, TypeContext $context = null)
- {
- Assert::stringNotEmpty($body);
- Assert::notNull($descriptionFactory);
-
- $startingLine = 1;
- $lineCount = null;
- $description = null;
-
- // Starting line / Number of lines / Description
- if (preg_match('/^([1-9]\d*)\s*(?:((?1))\s+)?(.*)$/sux', $body, $matches)) {
- $startingLine = (int)$matches[1];
- if (isset($matches[2]) && $matches[2] !== '') {
- $lineCount = (int)$matches[2];
- }
-
- $description = $matches[3];
- }
-
- return new static($startingLine, $lineCount, $descriptionFactory->create($description, $context));
- }
-
- /**
- * Gets the starting line.
- *
- * @return int The starting line, relative to the structural element's
- * location.
- */
- public function getStartingLine()
- {
- return $this->startingLine;
- }
-
- /**
- * Returns the number of lines.
- *
- * @return int|null The number of lines, relative to the starting line. NULL
- * means "to the end".
- */
- public function getLineCount()
- {
- return $this->lineCount;
- }
-
- public function __toString()
- {
- return $this->startingLine
- . ($this->lineCount !== null ? ' ' . $this->lineCount : '')
- . ($this->description ? ' ' . $this->description->render() : '');
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Throws.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Throws.php
deleted file mode 100644
index 349e773..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Throws.php
+++ /dev/null
@@ -1,72 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tags;
-
-use phpDocumentor\Reflection\DocBlock\Description;
-use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
-use phpDocumentor\Reflection\Type;
-use phpDocumentor\Reflection\TypeResolver;
-use phpDocumentor\Reflection\Types\Context as TypeContext;
-use Webmozart\Assert\Assert;
-
-/**
- * Reflection class for a {@}throws tag in a Docblock.
- */
-final class Throws extends BaseTag implements Factory\StaticMethod
-{
- protected $name = 'throws';
-
- /** @var Type */
- private $type;
-
- public function __construct(Type $type, Description $description = null)
- {
- $this->type = $type;
- $this->description = $description;
- }
-
- /**
- * {@inheritdoc}
- */
- public static function create(
- $body,
- TypeResolver $typeResolver = null,
- DescriptionFactory $descriptionFactory = null,
- TypeContext $context = null
- ) {
- Assert::string($body);
- Assert::allNotNull([$typeResolver, $descriptionFactory]);
-
- $parts = preg_split('/\s+/Su', $body, 2);
-
- $type = $typeResolver->resolve(isset($parts[0]) ? $parts[0] : '', $context);
- $description = $descriptionFactory->create(isset($parts[1]) ? $parts[1] : '', $context);
-
- return new static($type, $description);
- }
-
- /**
- * Returns the type section of the variable.
- *
- * @return Type
- */
- public function getType()
- {
- return $this->type;
- }
-
- public function __toString()
- {
- return $this->type . ' ' . $this->description;
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Uses.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Uses.php
deleted file mode 100644
index 00dc3e3..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Uses.php
+++ /dev/null
@@ -1,83 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tags;
-
-use phpDocumentor\Reflection\DocBlock\Description;
-use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
-use phpDocumentor\Reflection\Fqsen;
-use phpDocumentor\Reflection\FqsenResolver;
-use phpDocumentor\Reflection\Types\Context as TypeContext;
-use Webmozart\Assert\Assert;
-
-/**
- * Reflection class for a {@}uses tag in a Docblock.
- */
-final class Uses extends BaseTag implements Factory\StaticMethod
-{
- protected $name = 'uses';
-
- /** @var Fqsen */
- protected $refers = null;
-
- /**
- * Initializes this tag.
- *
- * @param Fqsen $refers
- * @param Description $description
- */
- public function __construct(Fqsen $refers, Description $description = null)
- {
- $this->refers = $refers;
- $this->description = $description;
- }
-
- /**
- * {@inheritdoc}
- */
- public static function create(
- $body,
- FqsenResolver $resolver = null,
- DescriptionFactory $descriptionFactory = null,
- TypeContext $context = null
- ) {
- Assert::string($body);
- Assert::allNotNull([$resolver, $descriptionFactory]);
-
- $parts = preg_split('/\s+/Su', $body, 2);
-
- return new static(
- $resolver->resolve($parts[0], $context),
- $descriptionFactory->create(isset($parts[1]) ? $parts[1] : '', $context)
- );
- }
-
- /**
- * Returns the structural element this tag refers to.
- *
- * @return Fqsen
- */
- public function getReference()
- {
- return $this->refers;
- }
-
- /**
- * Returns a string representation of this tag.
- *
- * @return string
- */
- public function __toString()
- {
- return $this->refers . ' ' . $this->description->render();
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Var_.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Var_.php
deleted file mode 100644
index 8907c95..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Var_.php
+++ /dev/null
@@ -1,118 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tags;
-
-use phpDocumentor\Reflection\DocBlock\Description;
-use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
-use phpDocumentor\Reflection\Type;
-use phpDocumentor\Reflection\TypeResolver;
-use phpDocumentor\Reflection\Types\Context as TypeContext;
-use Webmozart\Assert\Assert;
-
-/**
- * Reflection class for a {@}var tag in a Docblock.
- */
-class Var_ extends BaseTag implements Factory\StaticMethod
-{
- /** @var string */
- protected $name = 'var';
-
- /** @var Type */
- private $type;
-
- /** @var string */
- protected $variableName = '';
-
- /**
- * @param string $variableName
- * @param Type $type
- * @param Description $description
- */
- public function __construct($variableName, Type $type = null, Description $description = null)
- {
- Assert::string($variableName);
-
- $this->variableName = $variableName;
- $this->type = $type;
- $this->description = $description;
- }
-
- /**
- * {@inheritdoc}
- */
- public static function create(
- $body,
- TypeResolver $typeResolver = null,
- DescriptionFactory $descriptionFactory = null,
- TypeContext $context = null
- ) {
- Assert::stringNotEmpty($body);
- Assert::allNotNull([$typeResolver, $descriptionFactory]);
-
- $parts = preg_split('/(\s+)/Su', $body, 3, PREG_SPLIT_DELIM_CAPTURE);
- $type = null;
- $variableName = '';
-
- // if the first item that is encountered is not a variable; it is a type
- if (isset($parts[0]) && (strlen($parts[0]) > 0) && ($parts[0][0] !== '$')) {
- $type = $typeResolver->resolve(array_shift($parts), $context);
- array_shift($parts);
- }
-
- // if the next item starts with a $ or ...$ it must be the variable name
- if (isset($parts[0]) && (strlen($parts[0]) > 0) && ($parts[0][0] === '$')) {
- $variableName = array_shift($parts);
- array_shift($parts);
-
- if (substr($variableName, 0, 1) === '$') {
- $variableName = substr($variableName, 1);
- }
- }
-
- $description = $descriptionFactory->create(implode('', $parts), $context);
-
- return new static($variableName, $type, $description);
- }
-
- /**
- * Returns the variable's name.
- *
- * @return string
- */
- public function getVariableName()
- {
- return $this->variableName;
- }
-
- /**
- * Returns the variable's type or null if unknown.
- *
- * @return Type|null
- */
- public function getType()
- {
- return $this->type;
- }
-
- /**
- * Returns a string representation for this tag.
- *
- * @return string
- */
- public function __toString()
- {
- return ($this->type ? $this->type . ' ' : '')
- . (empty($this->variableName) ? null : ('$' . $this->variableName))
- . ($this->description ? ' ' . $this->description : '');
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Version.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Version.php
deleted file mode 100644
index 7bb0420..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Version.php
+++ /dev/null
@@ -1,94 +0,0 @@
-
- * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection\DocBlock\Tags;
-
-use phpDocumentor\Reflection\DocBlock\Description;
-use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
-use phpDocumentor\Reflection\Types\Context as TypeContext;
-use Webmozart\Assert\Assert;
-
-/**
- * Reflection class for a {@}version tag in a Docblock.
- */
-final class Version extends BaseTag implements Factory\StaticMethod
-{
- protected $name = 'version';
-
- /**
- * PCRE regular expression matching a version vector.
- * Assumes the "x" modifier.
- */
- const REGEX_VECTOR = '(?:
- # Normal release vectors.
- \d\S*
- |
- # VCS version vectors. Per PHPCS, they are expected to
- # follow the form of the VCS name, followed by ":", followed
- # by the version vector itself.
- # By convention, popular VCSes like CVS, SVN and GIT use "$"
- # around the actual version vector.
- [^\s\:]+\:\s*\$[^\$]+\$
- )';
-
- /** @var string The version vector. */
- private $version = '';
-
- public function __construct($version = null, Description $description = null)
- {
- Assert::nullOrStringNotEmpty($version);
-
- $this->version = $version;
- $this->description = $description;
- }
-
- /**
- * @return static
- */
- public static function create($body, DescriptionFactory $descriptionFactory = null, TypeContext $context = null)
- {
- Assert::nullOrString($body);
- if (empty($body)) {
- return new static();
- }
-
- $matches = [];
- if (!preg_match('/^(' . self::REGEX_VECTOR . ')\s*(.+)?$/sux', $body, $matches)) {
- return null;
- }
-
- return new static(
- $matches[1],
- $descriptionFactory->create(isset($matches[2]) ? $matches[2] : '', $context)
- );
- }
-
- /**
- * Gets the version section of the tag.
- *
- * @return string
- */
- public function getVersion()
- {
- return $this->version;
- }
-
- /**
- * Returns a string representation for this tag.
- *
- * @return string
- */
- public function __toString()
- {
- return $this->version . ($this->description ? ' ' . $this->description->render() : '');
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactory.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactory.php
deleted file mode 100644
index 1bdb8f4..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactory.php
+++ /dev/null
@@ -1,277 +0,0 @@
-
- * @license http://www.opensource.org/licenses/mit-license.php MIT
- * @link http://phpdoc.org
- */
-
-namespace phpDocumentor\Reflection;
-
-use phpDocumentor\Reflection\DocBlock\DescriptionFactory;
-use phpDocumentor\Reflection\DocBlock\StandardTagFactory;
-use phpDocumentor\Reflection\DocBlock\Tag;
-use phpDocumentor\Reflection\DocBlock\TagFactory;
-use Webmozart\Assert\Assert;
-
-final class DocBlockFactory implements DocBlockFactoryInterface
-{
- /** @var DocBlock\DescriptionFactory */
- private $descriptionFactory;
-
- /** @var DocBlock\TagFactory */
- private $tagFactory;
-
- /**
- * Initializes this factory with the required subcontractors.
- *
- * @param DescriptionFactory $descriptionFactory
- * @param TagFactory $tagFactory
- */
- public function __construct(DescriptionFactory $descriptionFactory, TagFactory $tagFactory)
- {
- $this->descriptionFactory = $descriptionFactory;
- $this->tagFactory = $tagFactory;
- }
-
- /**
- * Factory method for easy instantiation.
- *
- * @param string[] $additionalTags
- *
- * @return DocBlockFactory
- */
- public static function createInstance(array $additionalTags = [])
- {
- $fqsenResolver = new FqsenResolver();
- $tagFactory = new StandardTagFactory($fqsenResolver);
- $descriptionFactory = new DescriptionFactory($tagFactory);
-
- $tagFactory->addService($descriptionFactory);
- $tagFactory->addService(new TypeResolver($fqsenResolver));
-
- $docBlockFactory = new self($descriptionFactory, $tagFactory);
- foreach ($additionalTags as $tagName => $tagHandler) {
- $docBlockFactory->registerTagHandler($tagName, $tagHandler);
- }
-
- return $docBlockFactory;
- }
-
- /**
- * @param object|string $docblock A string containing the DocBlock to parse or an object supporting the
- * getDocComment method (such as a ReflectionClass object).
- * @param Types\Context $context
- * @param Location $location
- *
- * @return DocBlock
- */
- public function create($docblock, Types\Context $context = null, Location $location = null)
- {
- if (is_object($docblock)) {
- if (!method_exists($docblock, 'getDocComment')) {
- $exceptionMessage = 'Invalid object passed; the given object must support the getDocComment method';
- throw new \InvalidArgumentException($exceptionMessage);
- }
-
- $docblock = $docblock->getDocComment();
- }
-
- Assert::stringNotEmpty($docblock);
-
- if ($context === null) {
- $context = new Types\Context('');
- }
-
- $parts = $this->splitDocBlock($this->stripDocComment($docblock));
- list($templateMarker, $summary, $description, $tags) = $parts;
-
- return new DocBlock(
- $summary,
- $description ? $this->descriptionFactory->create($description, $context) : null,
- array_filter($this->parseTagBlock($tags, $context), function ($tag) {
- return $tag instanceof Tag;
- }),
- $context,
- $location,
- $templateMarker === '#@+',
- $templateMarker === '#@-'
- );
- }
-
- public function registerTagHandler($tagName, $handler)
- {
- $this->tagFactory->registerTagHandler($tagName, $handler);
- }
-
- /**
- * Strips the asterisks from the DocBlock comment.
- *
- * @param string $comment String containing the comment text.
- *
- * @return string
- */
- private function stripDocComment($comment)
- {
- $comment = trim(preg_replace('#[ \t]*(?:\/\*\*|\*\/|\*)?[ \t]{0,1}(.*)?#u', '$1', $comment));
-
- // reg ex above is not able to remove */ from a single line docblock
- if (substr($comment, -2) === '*/') {
- $comment = trim(substr($comment, 0, -2));
- }
-
- return str_replace(["\r\n", "\r"], "\n", $comment);
- }
-
- /**
- * Splits the DocBlock into a template marker, summary, description and block of tags.
- *
- * @param string $comment Comment to split into the sub-parts.
- *
- * @author Richard van Velzen (@_richardJ) Special thanks to Richard for the regex responsible for the split.
- * @author Mike van Riel for extending the regex with template marker support.
- *
- * @return string[] containing the template marker (if any), summary, description and a string containing the tags.
- */
- private function splitDocBlock($comment)
- {
- // Performance improvement cheat: if the first character is an @ then only tags are in this DocBlock. This
- // method does not split tags so we return this verbatim as the fourth result (tags). This saves us the
- // performance impact of running a regular expression
- if (strpos($comment, '@') === 0) {
- return ['', '', '', $comment];
- }
-
- // clears all extra horizontal whitespace from the line endings to prevent parsing issues
- $comment = preg_replace('/\h*$/Sum', '', $comment);
-
- /*
- * Splits the docblock into a template marker, summary, description and tags section.
- *
- * - The template marker is empty, #@+ or #@- if the DocBlock starts with either of those (a newline may
- * occur after it and will be stripped).
- * - The short description is started from the first character until a dot is encountered followed by a
- * newline OR two consecutive newlines (horizontal whitespace is taken into account to consider spacing
- * errors). This is optional.
- * - The long description, any character until a new line is encountered followed by an @ and word
- * characters (a tag). This is optional.
- * - Tags; the remaining characters
- *
- * Big thanks to RichardJ for contributing this Regular Expression
- */
- preg_match(
- '/
- \A
- # 1. Extract the template marker
- (?:(\#\@\+|\#\@\-)\n?)?
-
- # 2. Extract the summary
- (?:
- (?! @\pL ) # The summary may not start with an @
- (
- [^\n.]+
- (?:
- (?! \. \n | \n{2} ) # End summary upon a dot followed by newline or two newlines
- [\n.] (?! [ \t]* @\pL ) # End summary when an @ is found as first character on a new line
- [^\n.]+ # Include anything else
- )*
- \.?
- )?
- )
-
- # 3. Extract the description
- (?:
- \s* # Some form of whitespace _must_ precede a description because a summary must be there
- (?! @\pL ) # The description may not start with an @
- (
- [^\n]+
- (?: \n+
- (?! [ \t]* @\pL ) # End description when an @ is found as first character on a new line
- [^\n]+ # Include anything else
- )*
- )
- )?
-
- # 4. Extract the tags (anything that follows)
- (\s+ [\s\S]*)? # everything that follows
- /ux',
- $comment,
- $matches
- );
- array_shift($matches);
-
- while (count($matches) < 4) {
- $matches[] = '';
- }
-
- return $matches;
- }
-
- /**
- * Creates the tag objects.
- *
- * @param string $tags Tag block to parse.
- * @param Types\Context $context Context of the parsed Tag
- *
- * @return DocBlock\Tag[]
- */
- private function parseTagBlock($tags, Types\Context $context)
- {
- $tags = $this->filterTagBlock($tags);
- if (!$tags) {
- return [];
- }
-
- $result = $this->splitTagBlockIntoTagLines($tags);
- foreach ($result as $key => $tagLine) {
- $result[$key] = $this->tagFactory->create(trim($tagLine), $context);
- }
-
- return $result;
- }
-
- /**
- * @param string $tags
- *
- * @return string[]
- */
- private function splitTagBlockIntoTagLines($tags)
- {
- $result = [];
- foreach (explode("\n", $tags) as $tag_line) {
- if (isset($tag_line[0]) && ($tag_line[0] === '@')) {
- $result[] = $tag_line;
- } else {
- $result[count($result) - 1] .= "\n" . $tag_line;
- }
- }
-
- return $result;
- }
-
- /**
- * @param $tags
- * @return string
- */
- private function filterTagBlock($tags)
- {
- $tags = trim($tags);
- if (!$tags) {
- return null;
- }
-
- if ('@' !== $tags[0]) {
- // @codeCoverageIgnoreStart
- // Can't simulate this; this only happens if there is an error with the parsing of the DocBlock that
- // we didn't foresee.
- throw new \LogicException('A tag block started with text instead of an at-sign(@): ' . $tags);
- // @codeCoverageIgnoreEnd
- }
-
- return $tags;
- }
-}
diff --git a/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactoryInterface.php b/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactoryInterface.php
deleted file mode 100644
index b353342..0000000
--- a/vendor/phpdocumentor/reflection-docblock/src/DocBlockFactoryInterface.php
+++ /dev/null
@@ -1,23 +0,0 @@
- please note that if you want to pass partial class names that additional steps are necessary, see the
- > chapter `Resolving partial classes and FQSENs` for more information.
-
-Where the FqsenResolver can resolve:
-
-- Constant expressions (i.e. `@see \MyNamespace\MY_CONSTANT`)
-- Function expressions (i.e. `@see \MyNamespace\myFunction()`)
-- Class expressions (i.e. `@see \MyNamespace\MyClass`)
-- Interface expressions (i.e. `@see \MyNamespace\MyInterface`)
-- Trait expressions (i.e. `@see \MyNamespace\MyTrait`)
-- Class constant expressions (i.e. `@see \MyNamespace\MyClass::MY_CONSTANT`)
-- Property expressions (i.e. `@see \MyNamespace\MyClass::$myProperty`)
-- Method expressions (i.e. `@see \MyNamespace\MyClass::myMethod()`)
-
-## Resolving a type
-
-In order to resolve a type you will have to instantiate the class `\phpDocumentor\Reflection\TypeResolver` and call its `resolve` method like this:
-
-```php
-$typeResolver = new \phpDocumentor\Reflection\TypeResolver();
-$type = $typeResolver->resolve('string|integer');
-```
-
-In this example you will receive a Value Object of class `\phpDocumentor\Reflection\Types\Compound` that has two
-elements, one of type `\phpDocumentor\Reflection\Types\String_` and one of type
-`\phpDocumentor\Reflection\Types\Integer`.
-
-The real power of this resolver is in its capability to expand partial class names into fully qualified class names; but in order to do that we need an additional `\phpDocumentor\Reflection\Types\Context` class that will inform the resolver in which namespace the given expression occurs and which namespace aliases (or imports) apply.
-
-### Resolving nullable types
-
-Php 7.1 introduced nullable types e.g. `?string`. Type resolver will resolve the original type without the nullable notation `?`
-just like it would do without the `?`. After that the type is wrapped in a `\phpDocumentor\Reflection\Types\Nullable` object.
-The `Nullable` type has a method to fetch the actual type.
-
-## Resolving an FQSEN
-
-A Fully Qualified Structural Element Name is a reference to another element in your code bases and can be resolved using the `\phpDocumentor\Reflection\FqsenResolver` class' `resolve` method, like this:
-
-```php
-$fqsenResolver = new \phpDocumentor\Reflection\FqsenResolver();
-$fqsen = $fqsenResolver->resolve('\phpDocumentor\Reflection\FqsenResolver::resolve()');
-```
-
-In this example we resolve a Fully Qualified Structural Element Name (meaning that it includes the full namespace, class name and element name) and receive a Value Object of type `\phpDocumentor\Reflection\Fqsen`.
-
-The real power of this resolver is in its capability to expand partial element names into Fully Qualified Structural Element Names; but in order to do that we need an additional `\phpDocumentor\Reflection\Types\Context` class that will inform the resolver in which namespace the given expression occurs and which namespace aliases (or imports) apply.
-
-## Resolving partial Classes and Structural Element Names
-
-Perhaps the best feature of this library is that it knows how to resolve partial class names into fully qualified class names.
-
-For example, you have this file:
-
-```php
-namespace My\Example;
-
-use phpDocumentor\Reflection\Types;
-
-class Classy
-{
- /**
- * @var Types\Context
- * @see Classy::otherFunction()
- */
- public function __construct($context) {}
-
- public function otherFunction(){}
-}
-```
-
-Suppose that you would want to resolve (and expand) the type in the `@var` tag and the element name in the `@see` tag.
-
-For the resolvers to know how to expand partial names you have to provide a bit of _Context_ for them by instantiating a new class named `\phpDocumentor\Reflection\Types\Context` with the name of the namespace and the aliases that are in play.
-
-### Creating a Context
-
-You can do this by manually creating a Context like this:
-
-```php
-$context = new \phpDocumentor\Reflection\Types\Context(
- '\My\Example',
- [ 'Types' => '\phpDocumentor\Reflection\Types']
-);
-```
-
-Or by using the `\phpDocumentor\Reflection\Types\ContextFactory` to instantiate a new context based on a Reflector object or by providing the namespace that you'd like to extract and the source code of the file in which the given type expression occurs.
-
-```php
-$contextFactory = new \phpDocumentor\Reflection\Types\ContextFactory();
-$context = $contextFactory->createFromReflector(new ReflectionMethod('\My\Example\Classy', '__construct'));
-```
-
-or
-
-```php
-$contextFactory = new \phpDocumentor\Reflection\Types\ContextFactory();
-$context = $contextFactory->createForNamespace('\My\Example', file_get_contents('My/Example/Classy.php'));
-```
-
-### Using the Context
-
-After you have obtained a Context it is just a matter of passing it along with the `resolve` method of either Resolver class as second argument and the Resolvers will take this into account when resolving partial names.
-
-To obtain the resolved class name for the `@var` tag in the example above you can do:
-
-```php
-$typeResolver = new \phpDocumentor\Reflection\TypeResolver();
-$type = $typeResolver->resolve('Types\Context', $context);
-```
-
-When you do this you will receive an object of class `\phpDocumentor\Reflection\Types\Object_` for which you can call the `getFqsen` method to receive a Value Object that represents the complete FQSEN. So that would be `phpDocumentor\Reflection\Types\Context`.
-
-> Why is the FQSEN wrapped in another object `Object_`?
->
-> The resolve method of the TypeResolver only returns object with the interface `Type` and the FQSEN is a common type that does not represent a Type. Also: in some cases a type can represent an "Untyped Object", meaning that it is an object (signified by the `object` keyword) but does not refer to a specific element using an FQSEN.
-
-Another example is on how to resolve the FQSEN of a method as can be seen with the `@see` tag in the example above. To resolve that you can do the following:
-
-```php
-$fqsenResolver = new \phpDocumentor\Reflection\FqsenResolver();
-$type = $fqsenResolver->resolve('Classy::otherFunction()', $context);
-```
-
-Because Classy is a Class in the current namespace its FQSEN will have the `My\Example` namespace and by calling the `resolve` method of the FQSEN Resolver you will receive an `Fqsen` object that refers to `\My\Example\Classy::otherFunction()`.
diff --git a/vendor/phpdocumentor/type-resolver/appveyor.yml b/vendor/phpdocumentor/type-resolver/appveyor.yml
deleted file mode 100644
index 9dda46c..0000000
--- a/vendor/phpdocumentor/type-resolver/appveyor.yml
+++ /dev/null
@@ -1,52 +0,0 @@
-build: false
-clone_folder: c:\typeresolver
-max_jobs: 3
-platform: x86
-pull_requests:
- do_not_increment_build_number: true
-version: '{build}.{branch}'
-skip_tags: true
-branches:
- only:
- - master
-
-environment:
- matrix:
- - php_ver_target: 7.1
- - php_ver_target: 7.2
-matrix:
- fast_finish: false
-
-cache:
- - c:\php -> appveyor.yml
- - '%LOCALAPPDATA%\Composer\files'
-
-init:
- - SET PATH=C:\Program Files\OpenSSL;c:\tools\php;%PATH%
- - SET COMPOSER_NO_INTERACTION=1
- - SET PHP=1
- - SET ANSICON=121x90 (121x90)
-
-
-install:
- - IF EXIST c:\tools\php (SET PHP=0)
- - ps: appveyor-retry cinst --params '""/InstallDir:C:\tools\php""' --ignore-checksums -y php --version ((choco search php --exact --all-versions -r | select-string -pattern $env:php_ver_target | sort { [version]($_ -split '\|' | select -last 1) } -Descending | Select-Object -first 1) -replace '[php|]','')
- - cd c:\tools\php
- - IF %PHP%==1 copy /Y php.ini-development php.ini
- - IF %PHP%==1 echo max_execution_time=1200 >> php.ini
- - IF %PHP%==1 echo date.timezone="UTC" >> php.ini
- - IF %PHP%==1 echo extension_dir=ext >> php.ini
- - IF %PHP%==1 echo extension=php_curl.dll >> php.ini
- - IF %PHP%==1 echo extension=php_openssl.dll >> php.ini
- - IF %PHP%==1 echo extension=php_mbstring.dll >> php.ini
- - IF %PHP%==1 echo extension=php_fileinfo.dll >> php.ini
- - IF %PHP%==1 echo zend.assertions=1 >> php.ini
- - IF %PHP%==1 echo assert.exception=On >> php.ini
- - IF %PHP%==1 echo @php %%~dp0composer.phar %%* > composer.bat
- - appveyor-retry appveyor DownloadFile https://getcomposer.org/composer.phar
- - cd c:\typeresolver
- - composer install --no-interaction --prefer-dist --no-progress
-
-test_script:
- - cd c:\typeresolver
- - vendor\bin\phpunit --no-coverage
diff --git a/vendor/phpdocumentor/type-resolver/composer-require-config.json b/vendor/phpdocumentor/type-resolver/composer-require-config.json
deleted file mode 100644
index 19eee4f..0000000
--- a/vendor/phpdocumentor/type-resolver/composer-require-config.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "symbol-whitelist" : [
- "null", "true", "false",
- "static", "self", "parent",
- "array", "string", "int", "float", "bool", "iterable", "callable", "void", "object", "XSLTProcessor"
- ],
- "php-core-extensions" : [
- "Core",
- "pcre",
- "Reflection",
- "tokenizer",
- "SPL",
- "standard"
- ]
-}
diff --git a/vendor/phpdocumentor/type-resolver/composer.json b/vendor/phpdocumentor/type-resolver/composer.json
deleted file mode 100644
index f784935..0000000
--- a/vendor/phpdocumentor/type-resolver/composer.json
+++ /dev/null
@@ -1,36 +0,0 @@
-{
- "name": "phpdocumentor/type-resolver",
- "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
- "type": "library",
- "license": "MIT",
- "authors": [
- {
- "name": "Mike van Riel",
- "email": "me@mikevanriel.com"
- }
- ],
- "require": {
- "php": "^7.1",
- "phpdocumentor/reflection-common": "^2.0"
- },
- "require-dev": {
- "mockery/mockery": "~1",
- "ext-tokenizer": "^7.1",
- "phpunit/phpunit": "^7.0"
- },
- "autoload": {
- "psr-4": {
- "phpDocumentor\\Reflection\\": "src"
- }
- },
- "autoload-dev": {
- "psr-4": {
- "phpDocumentor\\Reflection\\": "tests/unit"
- }
- },
- "extra": {
- "branch-alias": {
- "dev-master": "1.x-dev"
- }
- }
-}
diff --git a/vendor/phpdocumentor/type-resolver/composer.lock b/vendor/phpdocumentor/type-resolver/composer.lock
deleted file mode 100644
index 529abe6..0000000
--- a/vendor/phpdocumentor/type-resolver/composer.lock
+++ /dev/null
@@ -1,1448 +0,0 @@
-{
- "_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#installing-dependencies",
- "This file is @generated automatically"
- ],
- "content-hash": "8168e5df1ad1444a9512e8b63bab2bfe",
- "packages": [
- {
- "name": "phpdocumentor/reflection-common",
- "version": "2.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/phpDocumentor/ReflectionCommon.git",
- "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a",
- "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a",
- "shasum": ""
- },
- "require": {
- "php": ">=7.1"
- },
- "require-dev": {
- "phpunit/phpunit": "~6"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.x-dev"
- }
- },
- "autoload": {
- "psr-4": {
- "phpDocumentor\\Reflection\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Jaap van Otterdijk",
- "email": "opensource@ijaap.nl"
- }
- ],
- "description": "Common reflection classes used by phpdocumentor to reflect the code structure",
- "homepage": "http://www.phpdoc.org",
- "keywords": [
- "FQSEN",
- "phpDocumentor",
- "phpdoc",
- "reflection",
- "static analysis"
- ],
- "time": "2018-08-07T13:53:10+00:00"
- }
- ],
- "packages-dev": [
- {
- "name": "doctrine/instantiator",
- "version": "1.2.0",
- "source": {
- "type": "git",
- "url": "https://github.com/doctrine/instantiator.git",
- "reference": "a2c590166b2133a4633738648b6b064edae0814a"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/doctrine/instantiator/zipball/a2c590166b2133a4633738648b6b064edae0814a",
- "reference": "a2c590166b2133a4633738648b6b064edae0814a",
- "shasum": ""
- },
- "require": {
- "php": "^7.1"
- },
- "require-dev": {
- "doctrine/coding-standard": "^6.0",
- "ext-pdo": "*",
- "ext-phar": "*",
- "phpbench/phpbench": "^0.13",
- "phpstan/phpstan-phpunit": "^0.11",
- "phpstan/phpstan-shim": "^0.11",
- "phpunit/phpunit": "^7.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.2.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://www.doctrine-project.org/projects/instantiator.html",
- "keywords": [
- "constructor",
- "instantiate"
- ],
- "time": "2019-03-17T17:37:11+00:00"
- },
- {
- "name": "hamcrest/hamcrest-php",
- "version": "v2.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/hamcrest/hamcrest-php.git",
- "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/776503d3a8e85d4f9a1148614f95b7a608b046ad",
- "reference": "776503d3a8e85d4f9a1148614f95b7a608b046ad",
- "shasum": ""
- },
- "require": {
- "php": "^5.3|^7.0"
- },
- "replace": {
- "cordoval/hamcrest-php": "*",
- "davedevelopment/hamcrest-php": "*",
- "kodova/hamcrest-php": "*"
- },
- "require-dev": {
- "phpunit/php-file-iterator": "1.3.3",
- "phpunit/phpunit": "~4.0",
- "satooshi/php-coveralls": "^1.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.0-dev"
- }
- },
- "autoload": {
- "classmap": [
- "hamcrest"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD"
- ],
- "description": "This is the PHP port of Hamcrest Matchers",
- "keywords": [
- "test"
- ],
- "time": "2016-01-20T08:20:44+00:00"
- },
- {
- "name": "mockery/mockery",
- "version": "1.2.2",
- "source": {
- "type": "git",
- "url": "https://github.com/mockery/mockery.git",
- "reference": "0eb0b48c3f07b3b89f5169ce005b7d05b18cf1d2"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/mockery/mockery/zipball/0eb0b48c3f07b3b89f5169ce005b7d05b18cf1d2",
- "reference": "0eb0b48c3f07b3b89f5169ce005b7d05b18cf1d2",
- "shasum": ""
- },
- "require": {
- "hamcrest/hamcrest-php": "~2.0",
- "lib-pcre": ">=7.0",
- "php": ">=5.6.0"
- },
- "require-dev": {
- "phpunit/phpunit": "~5.7.10|~6.5|~7.0|~8.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.0.x-dev"
- }
- },
- "autoload": {
- "psr-0": {
- "Mockery": "library/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Pádraic Brady",
- "email": "padraic.brady@gmail.com",
- "homepage": "http://blog.astrumfutura.com"
- },
- {
- "name": "Dave Marshall",
- "email": "dave.marshall@atstsolutions.co.uk",
- "homepage": "http://davedevelopment.co.uk"
- }
- ],
- "description": "Mockery is a simple yet flexible PHP mock object framework",
- "homepage": "https://github.com/mockery/mockery",
- "keywords": [
- "BDD",
- "TDD",
- "library",
- "mock",
- "mock objects",
- "mockery",
- "stub",
- "test",
- "test double",
- "testing"
- ],
- "time": "2019-02-13T09:37:52+00:00"
- },
- {
- "name": "myclabs/deep-copy",
- "version": "1.9.1",
- "source": {
- "type": "git",
- "url": "https://github.com/myclabs/DeepCopy.git",
- "reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72",
- "reference": "e6828efaba2c9b79f4499dae1d66ef8bfa7b2b72",
- "shasum": ""
- },
- "require": {
- "php": "^7.1"
- },
- "replace": {
- "myclabs/deep-copy": "self.version"
- },
- "require-dev": {
- "doctrine/collections": "^1.0",
- "doctrine/common": "^2.6",
- "phpunit/phpunit": "^7.1"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "DeepCopy\\": "src/DeepCopy/"
- },
- "files": [
- "src/DeepCopy/deep_copy.php"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "description": "Create deep copies (clones) of your objects",
- "keywords": [
- "clone",
- "copy",
- "duplicate",
- "object",
- "object graph"
- ],
- "time": "2019-04-07T13:18:21+00:00"
- },
- {
- "name": "phar-io/manifest",
- "version": "1.0.3",
- "source": {
- "type": "git",
- "url": "https://github.com/phar-io/manifest.git",
- "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4",
- "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4",
- "shasum": ""
- },
- "require": {
- "ext-dom": "*",
- "ext-phar": "*",
- "phar-io/version": "^2.0",
- "php": "^5.6 || ^7.0"
- },
- "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": "Arne Blankerts",
- "email": "arne@blankerts.de",
- "role": "Developer"
- },
- {
- "name": "Sebastian Heuer",
- "email": "sebastian@phpeople.de",
- "role": "Developer"
- },
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "Developer"
- }
- ],
- "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
- "time": "2018-07-08T19:23:20+00:00"
- },
- {
- "name": "phar-io/version",
- "version": "2.0.1",
- "source": {
- "type": "git",
- "url": "https://github.com/phar-io/version.git",
- "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6",
- "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6",
- "shasum": ""
- },
- "require": {
- "php": "^5.6 || ^7.0"
- },
- "type": "library",
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Arne Blankerts",
- "email": "arne@blankerts.de",
- "role": "Developer"
- },
- {
- "name": "Sebastian Heuer",
- "email": "sebastian@phpeople.de",
- "role": "Developer"
- },
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de",
- "role": "Developer"
- }
- ],
- "description": "Library for handling version information and constraints",
- "time": "2018-07-08T19:19:57+00:00"
- },
- {
- "name": "phpdocumentor/reflection-docblock",
- "version": "2.0.5",
- "source": {
- "type": "git",
- "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
- "reference": "e6a969a640b00d8daa3c66518b0405fb41ae0c4b"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/e6a969a640b00d8daa3c66518b0405fb41ae0c4b",
- "reference": "e6a969a640b00d8daa3c66518b0405fb41ae0c4b",
- "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": "2016-01-25T08:17:30+00:00"
- },
- {
- "name": "phpspec/prophecy",
- "version": "1.8.0",
- "source": {
- "type": "git",
- "url": "https://github.com/phpspec/prophecy.git",
- "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06",
- "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06",
- "shasum": ""
- },
- "require": {
- "doctrine/instantiator": "^1.0.2",
- "php": "^5.3|^7.0",
- "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0",
- "sebastian/comparator": "^1.1|^2.0|^3.0",
- "sebastian/recursion-context": "^1.0|^2.0|^3.0"
- },
- "require-dev": {
- "phpspec/phpspec": "^2.5|^3.2",
- "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.8.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": "2018-08-05T17:53:17+00:00"
- },
- {
- "name": "phpunit/php-code-coverage",
- "version": "6.1.4",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/807e6013b00af69b6c5d9ceb4282d0393dbb9d8d",
- "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d",
- "shasum": ""
- },
- "require": {
- "ext-dom": "*",
- "ext-xmlwriter": "*",
- "php": "^7.1",
- "phpunit/php-file-iterator": "^2.0",
- "phpunit/php-text-template": "^1.2.1",
- "phpunit/php-token-stream": "^3.0",
- "sebastian/code-unit-reverse-lookup": "^1.0.1",
- "sebastian/environment": "^3.1 || ^4.0",
- "sebastian/version": "^2.0.1",
- "theseer/tokenizer": "^1.1"
- },
- "require-dev": {
- "phpunit/phpunit": "^7.0"
- },
- "suggest": {
- "ext-xdebug": "^2.6.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "6.1-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": "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": "2018-10-31T16:06:48+00:00"
- },
- {
- "name": "phpunit/php-file-iterator",
- "version": "2.0.2",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/php-file-iterator.git",
- "reference": "050bedf145a257b1ff02746c31894800e5122946"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/050bedf145a257b1ff02746c31894800e5122946",
- "reference": "050bedf145a257b1ff02746c31894800e5122946",
- "shasum": ""
- },
- "require": {
- "php": "^7.1"
- },
- "require-dev": {
- "phpunit/phpunit": "^7.1"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.0.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": "FilterIterator implementation that filters files based on a list of suffixes.",
- "homepage": "https://github.com/sebastianbergmann/php-file-iterator/",
- "keywords": [
- "filesystem",
- "iterator"
- ],
- "time": "2018-09-13T20:33:42+00:00"
- },
- {
- "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-21T13:50:34+00:00"
- },
- {
- "name": "phpunit/php-timer",
- "version": "2.1.2",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/php-timer.git",
- "reference": "1038454804406b0b5f5f520358e78c1c2f71501e"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/1038454804406b0b5f5f520358e78c1c2f71501e",
- "reference": "1038454804406b0b5f5f520358e78c1c2f71501e",
- "shasum": ""
- },
- "require": {
- "php": "^7.1"
- },
- "require-dev": {
- "phpunit/phpunit": "^7.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.1-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": "Utility class for timing",
- "homepage": "https://github.com/sebastianbergmann/php-timer/",
- "keywords": [
- "timer"
- ],
- "time": "2019-06-07T04:22:29+00:00"
- },
- {
- "name": "phpunit/php-token-stream",
- "version": "3.0.1",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/php-token-stream.git",
- "reference": "c99e3be9d3e85f60646f152f9002d46ed7770d18"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/c99e3be9d3e85f60646f152f9002d46ed7770d18",
- "reference": "c99e3be9d3e85f60646f152f9002d46ed7770d18",
- "shasum": ""
- },
- "require": {
- "ext-tokenizer": "*",
- "php": "^7.1"
- },
- "require-dev": {
- "phpunit/phpunit": "^7.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.0-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": "2018-10-30T05:52:18+00:00"
- },
- {
- "name": "phpunit/phpunit",
- "version": "7.5.12",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "9ba59817745b0fe0c1a5a3032dfd4a6d2994ad1c"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9ba59817745b0fe0c1a5a3032dfd4a6d2994ad1c",
- "reference": "9ba59817745b0fe0c1a5a3032dfd4a6d2994ad1c",
- "shasum": ""
- },
- "require": {
- "doctrine/instantiator": "^1.1",
- "ext-dom": "*",
- "ext-json": "*",
- "ext-libxml": "*",
- "ext-mbstring": "*",
- "ext-xml": "*",
- "myclabs/deep-copy": "^1.7",
- "phar-io/manifest": "^1.0.2",
- "phar-io/version": "^2.0",
- "php": "^7.1",
- "phpspec/prophecy": "^1.7",
- "phpunit/php-code-coverage": "^6.0.7",
- "phpunit/php-file-iterator": "^2.0.1",
- "phpunit/php-text-template": "^1.2.1",
- "phpunit/php-timer": "^2.1",
- "sebastian/comparator": "^3.0",
- "sebastian/diff": "^3.0",
- "sebastian/environment": "^4.0",
- "sebastian/exporter": "^3.1",
- "sebastian/global-state": "^2.0",
- "sebastian/object-enumerator": "^3.0.3",
- "sebastian/resource-operations": "^2.0",
- "sebastian/version": "^2.0.1"
- },
- "conflict": {
- "phpunit/phpunit-mock-objects": "*"
- },
- "require-dev": {
- "ext-pdo": "*"
- },
- "suggest": {
- "ext-soap": "*",
- "ext-xdebug": "*",
- "phpunit/php-invoker": "^2.0"
- },
- "bin": [
- "phpunit"
- ],
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "7.5-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": "2019-05-28T11:59:40+00:00"
- },
- {
- "name": "sebastian/code-unit-reverse-lookup",
- "version": "1.0.1",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
- "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
- "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18",
- "shasum": ""
- },
- "require": {
- "php": "^5.6 || ^7.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^5.7 || ^6.0"
- },
- "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": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- }
- ],
- "description": "Looks up which function or method a line of code belongs to",
- "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
- "time": "2017-03-04T06:30:41+00:00"
- },
- {
- "name": "sebastian/comparator",
- "version": "3.0.2",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/5de4fc177adf9bce8df98d8d141a7559d7ccf6da",
- "reference": "5de4fc177adf9bce8df98d8d141a7559d7ccf6da",
- "shasum": ""
- },
- "require": {
- "php": "^7.1",
- "sebastian/diff": "^3.0",
- "sebastian/exporter": "^3.1"
- },
- "require-dev": {
- "phpunit/phpunit": "^7.1"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.0-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": "https://github.com/sebastianbergmann/comparator",
- "keywords": [
- "comparator",
- "compare",
- "equality"
- ],
- "time": "2018-07-12T15:12:46+00:00"
- },
- {
- "name": "sebastian/diff",
- "version": "3.0.2",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/720fcc7e9b5cf384ea68d9d930d480907a0c1a29",
- "reference": "720fcc7e9b5cf384ea68d9d930d480907a0c1a29",
- "shasum": ""
- },
- "require": {
- "php": "^7.1"
- },
- "require-dev": {
- "phpunit/phpunit": "^7.5 || ^8.0",
- "symfony/process": "^2 || ^3.3 || ^4"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.0-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",
- "udiff",
- "unidiff",
- "unified diff"
- ],
- "time": "2019-02-04T06:01:07+00:00"
- },
- {
- "name": "sebastian/environment",
- "version": "4.2.2",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/environment.git",
- "reference": "f2a2c8e1c97c11ace607a7a667d73d47c19fe404"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/f2a2c8e1c97c11ace607a7a667d73d47c19fe404",
- "reference": "f2a2c8e1c97c11ace607a7a667d73d47c19fe404",
- "shasum": ""
- },
- "require": {
- "php": "^7.1"
- },
- "require-dev": {
- "phpunit/phpunit": "^7.5"
- },
- "suggest": {
- "ext-posix": "*"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "4.2-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": "2019-05-05T09:05:15+00:00"
- },
- {
- "name": "sebastian/exporter",
- "version": "3.1.0",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "234199f4528de6d12aaa58b612e98f7d36adb937"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937",
- "reference": "234199f4528de6d12aaa58b612e98f7d36adb937",
- "shasum": ""
- },
- "require": {
- "php": "^7.0",
- "sebastian/recursion-context": "^3.0"
- },
- "require-dev": {
- "ext-mbstring": "*",
- "phpunit/phpunit": "^6.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.1.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": "2017-04-03T13:19:02+00:00"
- },
- {
- "name": "sebastian/global-state",
- "version": "2.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/global-state.git",
- "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4",
- "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4",
- "shasum": ""
- },
- "require": {
- "php": "^7.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^6.0"
- },
- "suggest": {
- "ext-uopz": "*"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.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": "2017-04-27T15:39:26+00:00"
- },
- {
- "name": "sebastian/object-enumerator",
- "version": "3.0.3",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/object-enumerator.git",
- "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5",
- "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5",
- "shasum": ""
- },
- "require": {
- "php": "^7.0",
- "sebastian/object-reflector": "^1.1.1",
- "sebastian/recursion-context": "^3.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^6.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.0.x-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- }
- ],
- "description": "Traverses array structures and object graphs to enumerate all referenced objects",
- "homepage": "https://github.com/sebastianbergmann/object-enumerator/",
- "time": "2017-08-03T12:35:26+00:00"
- },
- {
- "name": "sebastian/object-reflector",
- "version": "1.1.1",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/object-reflector.git",
- "reference": "773f97c67f28de00d397be301821b06708fca0be"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be",
- "reference": "773f97c67f28de00d397be301821b06708fca0be",
- "shasum": ""
- },
- "require": {
- "php": "^7.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^6.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "1.1-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- }
- ],
- "description": "Allows reflection of object attributes, including inherited and non-public ones",
- "homepage": "https://github.com/sebastianbergmann/object-reflector/",
- "time": "2017-03-29T09:07:27+00:00"
- },
- {
- "name": "sebastian/recursion-context",
- "version": "3.0.0",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/recursion-context.git",
- "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8",
- "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8",
- "shasum": ""
- },
- "require": {
- "php": "^7.0"
- },
- "require-dev": {
- "phpunit/phpunit": "^6.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.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": "2017-03-03T06:23:57+00:00"
- },
- {
- "name": "sebastian/resource-operations",
- "version": "2.0.1",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/resource-operations.git",
- "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/4d7a795d35b889bf80a0cc04e08d77cedfa917a9",
- "reference": "4d7a795d35b889bf80a0cc04e08d77cedfa917a9",
- "shasum": ""
- },
- "require": {
- "php": "^7.1"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.0-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- }
- ],
- "description": "Provides a list of PHP built-in functions that operate on resources",
- "homepage": "https://www.github.com/sebastianbergmann/resource-operations",
- "time": "2018-10-04T04:07:39+00:00"
- },
- {
- "name": "sebastian/version",
- "version": "2.0.1",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/version.git",
- "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019",
- "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019",
- "shasum": ""
- },
- "require": {
- "php": ">=5.6"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "2.0.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": "Library that helps with managing the version number of Git-hosted PHP projects",
- "homepage": "https://github.com/sebastianbergmann/version",
- "time": "2016-10-03T07:35:21+00:00"
- },
- {
- "name": "theseer/tokenizer",
- "version": "1.1.2",
- "source": {
- "type": "git",
- "url": "https://github.com/theseer/tokenizer.git",
- "reference": "1c42705be2b6c1de5904f8afacef5895cab44bf8"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/theseer/tokenizer/zipball/1c42705be2b6c1de5904f8afacef5895cab44bf8",
- "reference": "1c42705be2b6c1de5904f8afacef5895cab44bf8",
- "shasum": ""
- },
- "require": {
- "ext-dom": "*",
- "ext-tokenizer": "*",
- "ext-xmlwriter": "*",
- "php": "^7.0"
- },
- "type": "library",
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Arne Blankerts",
- "email": "arne@blankerts.de",
- "role": "Developer"
- }
- ],
- "description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
- "time": "2019-04-04T09:56:43+00:00"
- }
- ],
- "aliases": [],
- "minimum-stability": "stable",
- "stability-flags": [],
- "prefer-stable": false,
- "prefer-lowest": false,
- "platform": {
- "php": "^7.1"
- },
- "platform-dev": {
- "ext-tokenizer": "^7.1"
- }
-}
diff --git a/vendor/phpdocumentor/type-resolver/phive.xml b/vendor/phpdocumentor/type-resolver/phive.xml
deleted file mode 100644
index 9908931..0000000
--- a/vendor/phpdocumentor/type-resolver/phive.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/vendor/phpdocumentor/type-resolver/phpcs.xml.dist b/vendor/phpdocumentor/type-resolver/phpcs.xml.dist
deleted file mode 100644
index c030e8d..0000000
--- a/vendor/phpdocumentor/type-resolver/phpcs.xml.dist
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
- The coding standard for phpDocumentor.
-
- src
- tests/unit
- */tests/unit/Types/ContextFactoryTest.php
-
-
- *\.php
-
-
-
-
-
-
-
- */src/*_.php
-
-
-
- */src/*/Abstract*.php
-
-
-
-
-
-
-
-
diff --git a/vendor/phpdocumentor/type-resolver/phpstan.neon b/vendor/phpdocumentor/type-resolver/phpstan.neon
deleted file mode 100644
index 73a7e51..0000000
--- a/vendor/phpdocumentor/type-resolver/phpstan.neon
+++ /dev/null
@@ -1,7 +0,0 @@
-parameters:
- ignoreErrors:
- -
- message: '#Parameter \#1 \$types of class phpDocumentor\\Reflection\\Types\\Compound constructor expects array, array given\.#'
- path: %currentWorkingDirectory%/tests/unit/Types/CompoundTest.php
- - message: '#Parameter \#2 \$fileContents of method phpDocumentor\\Reflection\\Types\\ContextFactory::createForNamespace\(\) expects string, string|false given\.#'
- path: %currentWorkingDirectory%/tests/unit/Types/ContextFactoryTest.php
diff --git a/vendor/phpdocumentor/type-resolver/psalm.xml b/vendor/phpdocumentor/type-resolver/psalm.xml
deleted file mode 100644
index 9fedb8a..0000000
--- a/vendor/phpdocumentor/type-resolver/psalm.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/vendor/phpdocumentor/type-resolver/src/FqsenResolver.php b/vendor/phpdocumentor/type-resolver/src/FqsenResolver.php
deleted file mode 100644
index 1f9fe50..0000000
--- a/vendor/phpdocumentor/type-resolver/src/FqsenResolver.php
+++ /dev/null
@@ -1,74 +0,0 @@
-isFqsen($fqsen)) {
- return new Fqsen($fqsen);
- }
-
- return $this->resolvePartialStructuralElementName($fqsen, $context);
- }
-
- /**
- * Tests whether the given type is a Fully Qualified Structural Element Name.
- */
- private function isFqsen(string $type) : bool
- {
- return strpos($type, self::OPERATOR_NAMESPACE) === 0;
- }
-
- /**
- * Resolves a partial Structural Element Name (i.e. `Reflection\DocBlock`) to its FQSEN representation
- * (i.e. `\phpDocumentor\Reflection\DocBlock`) based on the Namespace and aliases mentioned in the Context.
- *
- * @throws InvalidArgumentException When type is not a valid FQSEN.
- */
- private function resolvePartialStructuralElementName(string $type, Context $context) : Fqsen
- {
- $typeParts = explode(self::OPERATOR_NAMESPACE, $type, 2);
-
- $namespaceAliases = $context->getNamespaceAliases();
-
- // if the first segment is not an alias; prepend namespace name and return
- if (!isset($namespaceAliases[$typeParts[0]])) {
- $namespace = $context->getNamespace();
- if ($namespace !== '') {
- $namespace .= self::OPERATOR_NAMESPACE;
- }
-
- return new Fqsen(self::OPERATOR_NAMESPACE . $namespace . $type);
- }
-
- $typeParts[0] = $namespaceAliases[$typeParts[0]];
-
- return new Fqsen(self::OPERATOR_NAMESPACE . implode(self::OPERATOR_NAMESPACE, $typeParts));
- }
-}
diff --git a/vendor/phpdocumentor/type-resolver/src/Type.php b/vendor/phpdocumentor/type-resolver/src/Type.php
deleted file mode 100644
index fc931eb..0000000
--- a/vendor/phpdocumentor/type-resolver/src/Type.php
+++ /dev/null
@@ -1,22 +0,0 @@
- List of recognized keywords and unto which Value Object they map
- * @psalm-var array>
- */
- private $keywords = [
- 'string' => Types\String_::class,
- 'int' => Types\Integer::class,
- 'integer' => Types\Integer::class,
- 'bool' => Types\Boolean::class,
- 'boolean' => Types\Boolean::class,
- 'real' => Types\Float_::class,
- 'float' => Types\Float_::class,
- 'double' => Types\Float_::class,
- 'object' => Object_::class,
- 'mixed' => Types\Mixed_::class,
- 'array' => Array_::class,
- 'resource' => Types\Resource_::class,
- 'void' => Types\Void_::class,
- 'null' => Types\Null_::class,
- 'scalar' => Types\Scalar::class,
- 'callback' => Types\Callable_::class,
- 'callable' => Types\Callable_::class,
- 'false' => Types\Boolean::class,
- 'true' => Types\Boolean::class,
- 'self' => Types\Self_::class,
- '$this' => Types\This::class,
- 'static' => Types\Static_::class,
- 'parent' => Types\Parent_::class,
- 'iterable' => Iterable_::class,
- ];
-
- /** @var FqsenResolver */
- private $fqsenResolver;
-
- /**
- * Initializes this TypeResolver with the means to create and resolve Fqsen objects.
- */
- public function __construct(?FqsenResolver $fqsenResolver = null)
- {
- $this->fqsenResolver = $fqsenResolver ?: new FqsenResolver();
- }
-
- /**
- * Analyzes the given type and returns the FQCN variant.
- *
- * When a type is provided this method checks whether it is not a keyword or
- * Fully Qualified Class Name. If so it will use the given namespace and
- * aliases to expand the type to a FQCN representation.
- *
- * This method only works as expected if the namespace and aliases are set;
- * no dynamic reflection is being performed here.
- *
- * @uses Context::getNamespaceAliases() to check whether the first part of the relative type name should not be
- * replaced with another namespace.
- * @uses Context::getNamespace() to determine with what to prefix the type name.
- *
- * @param string $type The relative or absolute type.
- */
- public function resolve(string $type, ?Context $context = null) : Type
- {
- $type = trim($type);
- if (!$type) {
- throw new InvalidArgumentException('Attempted to resolve "' . $type . '" but it appears to be empty');
- }
-
- if ($context === null) {
- $context = new Context('');
- }
-
- // split the type string into tokens `|`, `?`, `<`, `>`, `,`, `(`, `)[]`, '<', '>' and type names
- $tokens = preg_split(
- '/(\\||\\?|<|>|, ?|\\(|\\)(?:\\[\\])+)/',
- $type,
- -1,
- PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE
- );
-
- if ($tokens === false) {
- throw new InvalidArgumentException('Unable to split the type string "' . $type . '" into tokens');
- }
-
- $tokenIterator = new ArrayIterator($tokens);
-
- return $this->parseTypes($tokenIterator, $context, self::PARSER_IN_COMPOUND);
- }
-
- /**
- * Analyse each tokens and creates types
- *
- * @param ArrayIterator $tokens the iterator on tokens
- * @param int $parserContext on of self::PARSER_* constants, indicating
- * the context where we are in the parsing
- */
- private function parseTypes(ArrayIterator $tokens, Context $context, int $parserContext) : Type
- {
- $types = [];
- $token = '';
- while ($tokens->valid()) {
- $token = $tokens->current();
-
- if ($token === '|') {
- if (count($types) === 0) {
- throw new RuntimeException(
- 'A type is missing before a type separator'
- );
- }
-
- if ($parserContext !== self::PARSER_IN_COMPOUND
- && $parserContext !== self::PARSER_IN_ARRAY_EXPRESSION
- && $parserContext !== self::PARSER_IN_COLLECTION_EXPRESSION
- ) {
- throw new RuntimeException(
- 'Unexpected type separator'
- );
- }
-
- $tokens->next();
- } elseif ($token === '?') {
- if ($parserContext !== self::PARSER_IN_COMPOUND
- && $parserContext !== self::PARSER_IN_ARRAY_EXPRESSION
- && $parserContext !== self::PARSER_IN_COLLECTION_EXPRESSION
- ) {
- throw new RuntimeException(
- 'Unexpected nullable character'
- );
- }
-
- $tokens->next();
- $type = $this->parseTypes($tokens, $context, self::PARSER_IN_NULLABLE);
- $types[] = new Nullable($type);
- } elseif ($token === '(') {
- $tokens->next();
- $type = $this->parseTypes($tokens, $context, self::PARSER_IN_ARRAY_EXPRESSION);
-
- $resolvedType = new Array_($type);
-
- $token = $tokens->current();
- // Someone did not properly close their array expression ..
- if ($token === null) {
- break;
- }
-
- // we generate arrays corresponding to the number of '[]' after the ')'
- $numberOfArrays = (strlen($token) - 1) / 2;
- for ($i = 0; $i < $numberOfArrays - 1; ++$i) {
- $resolvedType = new Array_($resolvedType);
- }
-
- $types[] = $resolvedType;
- $tokens->next();
- } elseif ($parserContext === self::PARSER_IN_ARRAY_EXPRESSION && $token[0] === ')') {
- break;
- } elseif ($token === '<') {
- if (count($types) === 0) {
- throw new RuntimeException(
- 'Unexpected collection operator "<", class name is missing'
- );
- }
-
- $classType = array_pop($types);
- if ($classType !== null) {
- $types[] = $this->resolveCollection($tokens, $classType, $context);
- }
-
- $tokens->next();
- } elseif ($parserContext === self::PARSER_IN_COLLECTION_EXPRESSION
- && ($token === '>' || trim($token) === ',')
- ) {
- break;
- } else {
- $type = $this->resolveSingleType($token, $context);
- $tokens->next();
- if ($parserContext === self::PARSER_IN_NULLABLE) {
- return $type;
- }
-
- $types[] = $type;
- }
- }
-
- if ($token === '|') {
- throw new RuntimeException(
- 'A type is missing after a type separator'
- );
- }
-
- if (count($types) === 0) {
- if ($parserContext === self::PARSER_IN_NULLABLE) {
- throw new RuntimeException(
- 'A type is missing after a nullable character'
- );
- }
-
- if ($parserContext === self::PARSER_IN_ARRAY_EXPRESSION) {
- throw new RuntimeException(
- 'A type is missing in an array expression'
- );
- }
-
- if ($parserContext === self::PARSER_IN_COLLECTION_EXPRESSION) {
- throw new RuntimeException(
- 'A type is missing in a collection expression'
- );
- }
- } elseif (count($types) === 1) {
- return $types[0];
- }
-
- return new Compound($types);
- }
-
- /**
- * resolve the given type into a type object
- *
- * @param string $type the type string, representing a single type
- *
- * @return Type|Array_|Object_
- */
- private function resolveSingleType(string $type, Context $context)
- {
- switch (true) {
- case $this->isKeyword($type):
- return $this->resolveKeyword($type);
- case $this->isTypedArray($type):
- return $this->resolveTypedArray($type, $context);
- case $this->isFqsen($type):
- return $this->resolveTypedObject($type);
- case $this->isPartialStructuralElementName($type):
- return $this->resolveTypedObject($type, $context);
- // @codeCoverageIgnoreStart
- default:
- // I haven't got the foggiest how the logic would come here but added this as a defense.
- throw new RuntimeException(
- 'Unable to resolve type "' . $type . '", there is no known method to resolve it'
- );
- }
-
- // @codeCoverageIgnoreEnd
- }
-
- /**
- * Adds a keyword to the list of Keywords and associates it with a specific Value Object.
- */
- public function addKeyword(string $keyword, string $typeClassName) : void
- {
- if (!class_exists($typeClassName)) {
- throw new InvalidArgumentException(
- 'The Value Object that needs to be created with a keyword "' . $keyword . '" must be an existing class'
- . ' but we could not find the class ' . $typeClassName
- );
- }
-
- if (!in_array(Type::class, class_implements($typeClassName), true)) {
- throw new InvalidArgumentException(
- 'The class "' . $typeClassName . '" must implement the interface "phpDocumentor\Reflection\Type"'
- );
- }
-
- $this->keywords[$keyword] = $typeClassName;
- }
-
- /**
- * Detects whether the given type represents an array.
- *
- * @param string $type A relative or absolute type as defined in the phpDocumentor documentation.
- */
- private function isTypedArray(string $type) : bool
- {
- return substr($type, -2) === self::OPERATOR_ARRAY;
- }
-
- /**
- * Detects whether the given type represents a PHPDoc keyword.
- *
- * @param string $type A relative or absolute type as defined in the phpDocumentor documentation.
- */
- private function isKeyword(string $type) : bool
- {
- return in_array(strtolower($type), array_keys($this->keywords), true);
- }
-
- /**
- * Detects whether the given type represents a relative structural element name.
- *
- * @param string $type A relative or absolute type as defined in the phpDocumentor documentation.
- */
- private function isPartialStructuralElementName(string $type) : bool
- {
- return ($type[0] !== self::OPERATOR_NAMESPACE) && !$this->isKeyword($type);
- }
-
- /**
- * Tests whether the given type is a Fully Qualified Structural Element Name.
- */
- private function isFqsen(string $type) : bool
- {
- return strpos($type, self::OPERATOR_NAMESPACE) === 0;
- }
-
- /**
- * Resolves the given typed array string (i.e. `string[]`) into an Array object with the right types set.
- */
- private function resolveTypedArray(string $type, Context $context) : Array_
- {
- return new Array_($this->resolveSingleType(substr($type, 0, -2), $context));
- }
-
- /**
- * Resolves the given keyword (such as `string`) into a Type object representing that keyword.
- */
- private function resolveKeyword(string $type) : Type
- {
- $className = $this->keywords[strtolower($type)];
- return new $className();
- }
-
- /**
- * Resolves the given FQSEN string into an FQSEN object.
- */
- private function resolveTypedObject(string $type, ?Context $context = null) : Object_
- {
- return new Object_($this->fqsenResolver->resolve($type, $context));
- }
-
- /**
- * Resolves the collection values and keys
- *
- * @return Array_|Collection
- */
- private function resolveCollection(ArrayIterator $tokens, Type $classType, Context $context) : Type
- {
- $isArray = ((string) $classType === 'array');
-
- // allow only "array" or class name before "<"
- if (!$isArray
- && (!$classType instanceof Object_ || $classType->getFqsen() === null)) {
- throw new RuntimeException(
- $classType . ' is not a collection'
- );
- }
-
- $tokens->next();
-
- $valueType = $this->parseTypes($tokens, $context, self::PARSER_IN_COLLECTION_EXPRESSION);
- $keyType = null;
-
- if ($tokens->current() !== null && trim($tokens->current()) === ',') {
- // if we have a comma, then we just parsed the key type, not the value type
- $keyType = $valueType;
- if ($isArray) {
- // check the key type for an "array" collection. We allow only
- // strings or integers.
- if (!$keyType instanceof String_ &&
- !$keyType instanceof Integer &&
- !$keyType instanceof Compound
- ) {
- throw new RuntimeException(
- 'An array can have only integers or strings as keys'
- );
- }
-
- if ($keyType instanceof Compound) {
- foreach ($keyType->getIterator() as $item) {
- if (!$item instanceof String_ &&
- !$item instanceof Integer
- ) {
- throw new RuntimeException(
- 'An array can have only integers or strings as keys'
- );
- }
- }
- }
- }
-
- $tokens->next();
- // now let's parse the value type
- $valueType = $this->parseTypes($tokens, $context, self::PARSER_IN_COLLECTION_EXPRESSION);
- }
-
- if ($tokens->current() !== '>') {
- if (empty($tokens->current())) {
- throw new RuntimeException(
- 'Collection: ">" is missing'
- );
- }
-
- throw new RuntimeException(
- 'Unexpected character "' . $tokens->current() . '", ">" is missing'
- );
- }
-
- if ($isArray) {
- return new Array_($valueType, $keyType);
- }
-
- /** @psalm-suppress RedundantCondition */
- if ($classType instanceof Object_) {
- return $this->makeCollectionFromObject($classType, $valueType, $keyType);
- }
-
- throw new RuntimeException('Invalid $classType provided');
- }
-
- private function makeCollectionFromObject(Object_ $object, Type $valueType, ?Type $keyType = null) : Collection
- {
- return new Collection($object->getFqsen(), $valueType, $keyType);
- }
-}
diff --git a/vendor/phpdocumentor/type-resolver/src/Types/AbstractList.php b/vendor/phpdocumentor/type-resolver/src/Types/AbstractList.php
deleted file mode 100644
index 06260bc..0000000
--- a/vendor/phpdocumentor/type-resolver/src/Types/AbstractList.php
+++ /dev/null
@@ -1,85 +0,0 @@
-valueType = $valueType;
- $this->defaultKeyType = new Compound([new String_(), new Integer()]);
- $this->keyType = $keyType;
- }
-
- /**
- * Returns the type for the keys of this array.
- */
- public function getKeyType() : Type
- {
- if ($this->keyType === null) {
- return $this->defaultKeyType;
- }
-
- return $this->keyType;
- }
-
- /**
- * Returns the value for the keys of this array.
- */
- public function getValueType() : Type
- {
- return $this->valueType;
- }
-
- /**
- * Returns a rendered output of the Type as it would be used in a DocBlock.
- */
- public function __toString() : string
- {
- if ($this->keyType) {
- return 'array<' . $this->keyType . ',' . $this->valueType . '>';
- }
-
- if ($this->valueType instanceof Mixed_) {
- return 'array';
- }
-
- if ($this->valueType instanceof Compound) {
- return '(' . $this->valueType . ')[]';
- }
-
- return $this->valueType . '[]';
- }
-}
diff --git a/vendor/phpdocumentor/type-resolver/src/Types/Array_.php b/vendor/phpdocumentor/type-resolver/src/Types/Array_.php
deleted file mode 100644
index 7e3b13f..0000000
--- a/vendor/phpdocumentor/type-resolver/src/Types/Array_.php
+++ /dev/null
@@ -1,27 +0,0 @@
-`
- * 2. `ACollectionObject`
- *
- * - ACollectionObject can be 'array' or an object that can act as an array
- * - aValueType and aKeyType can be any type expression
- */
-final class Collection extends AbstractList
-{
- /** @var Fqsen|null */
- private $fqsen;
-
- /**
- * Initializes this representation of an array with the given Type or Fqsen.
- */
- public function __construct(?Fqsen $fqsen, Type $valueType, ?Type $keyType = null)
- {
- parent::__construct($valueType, $keyType);
-
- $this->fqsen = $fqsen;
- }
-
- /**
- * Returns the FQSEN associated with this object.
- */
- public function getFqsen() : ?Fqsen
- {
- return $this->fqsen;
- }
-
- /**
- * Returns a rendered output of the Type as it would be used in a DocBlock.
- */
- public function __toString() : string
- {
- $objectType = (string) ($this->fqsen ?? 'object');
-
- if ($this->keyType === null) {
- return $objectType . '<' . $this->valueType . '>';
- }
-
- return $objectType . '<' . $this->keyType . ',' . $this->valueType . '>';
- }
-}
diff --git a/vendor/phpdocumentor/type-resolver/src/Types/Compound.php b/vendor/phpdocumentor/type-resolver/src/Types/Compound.php
deleted file mode 100644
index 1da7bf9..0000000
--- a/vendor/phpdocumentor/type-resolver/src/Types/Compound.php
+++ /dev/null
@@ -1,88 +0,0 @@
-types = $types;
- }
-
- /**
- * Returns the type at the given index.
- */
- public function get(int $index) : ?Type
- {
- if (!$this->has($index)) {
- return null;
- }
-
- return $this->types[$index];
- }
-
- /**
- * Tests if this compound type has a type with the given index.
- */
- public function has(int $index) : bool
- {
- return isset($this->types[$index]);
- }
-
- /**
- * Returns a rendered output of the Type as it would be used in a DocBlock.
- */
- public function __toString() : string
- {
- return implode('|', $this->types);
- }
-
- /**
- * {@inheritdoc}
- */
- public function getIterator()
- {
- return new ArrayIterator($this->types);
- }
-}
diff --git a/vendor/phpdocumentor/type-resolver/src/Types/Context.php b/vendor/phpdocumentor/type-resolver/src/Types/Context.php
deleted file mode 100644
index 6e29baa..0000000
--- a/vendor/phpdocumentor/type-resolver/src/Types/Context.php
+++ /dev/null
@@ -1,88 +0,0 @@
- Fully Qualified Namespace. */
- private $namespaceAliases;
-
- /**
- * Initializes the new context and normalizes all passed namespaces to be in Qualified Namespace Name (QNN)
- * format (without a preceding `\`).
- *
- * @param string $namespace The namespace where this DocBlock resides in.
- * @param string[] $namespaceAliases List of namespace aliases => Fully Qualified Namespace.
- */
- public function __construct(string $namespace, array $namespaceAliases = [])
- {
- $this->namespace = $namespace !== 'global' && $namespace !== 'default'
- ? trim($namespace, '\\')
- : '';
-
- foreach ($namespaceAliases as $alias => $fqnn) {
- if ($fqnn[0] === '\\') {
- $fqnn = substr($fqnn, 1);
- }
-
- if ($fqnn[strlen($fqnn) - 1] === '\\') {
- $fqnn = substr($fqnn, 0, -1);
- }
-
- $namespaceAliases[$alias] = $fqnn;
- }
-
- $this->namespaceAliases = $namespaceAliases;
- }
-
- /**
- * Returns the Qualified Namespace Name (thus without `\` in front) where the associated element is in.
- */
- public function getNamespace() : string
- {
- return $this->namespace;
- }
-
- /**
- * Returns a list of Qualified Namespace Names (thus without `\` in front) that are imported, the keys represent
- * the alias for the imported Namespace.
- *
- * @return string[]
- */
- public function getNamespaceAliases() : array
- {
- return $this->namespaceAliases;
- }
-}
diff --git a/vendor/phpdocumentor/type-resolver/src/Types/ContextFactory.php b/vendor/phpdocumentor/type-resolver/src/Types/ContextFactory.php
deleted file mode 100644
index 851a3c2..0000000
--- a/vendor/phpdocumentor/type-resolver/src/Types/ContextFactory.php
+++ /dev/null
@@ -1,350 +0,0 @@
-createFromReflectionClass($reflector);
- }
-
- if ($reflector instanceof ReflectionParameter) {
- return $this->createFromReflectionParameter($reflector);
- }
-
- if ($reflector instanceof ReflectionMethod) {
- return $this->createFromReflectionMethod($reflector);
- }
-
- if ($reflector instanceof ReflectionProperty) {
- return $this->createFromReflectionProperty($reflector);
- }
-
- if ($reflector instanceof ReflectionClassConstant) {
- return $this->createFromReflectionClassConstant($reflector);
- }
-
- throw new UnexpectedValueException('Unhandled \Reflector instance given: ' . get_class($reflector));
- }
-
- private function createFromReflectionParameter(ReflectionParameter $parameter) : Context
- {
- $class = $parameter->getDeclaringClass();
- if ($class) {
- return $this->createFromReflectionClass($class);
- }
-
- throw new InvalidArgumentException('Unable to get class of ' . $parameter->getName());
- }
-
- private function createFromReflectionMethod(ReflectionMethod $method) : Context
- {
- return $this->createFromReflectionClass($method->getDeclaringClass());
- }
-
- private function createFromReflectionProperty(ReflectionProperty $property) : Context
- {
- return $this->createFromReflectionClass($property->getDeclaringClass());
- }
-
- private function createFromReflectionClassConstant(ReflectionClassConstant $constant) : Context
- {
- return $this->createFromReflectionClass($constant->getDeclaringClass());
- }
-
- private function createFromReflectionClass(ReflectionClass $class) : Context
- {
- $fileName = $class->getFileName();
- $namespace = $class->getNamespaceName();
-
- if (is_string($fileName) && file_exists($fileName)) {
- $contents = file_get_contents($fileName);
- if ($contents === false) {
- throw new RuntimeException('Unable to read file "' . $fileName . '"');
- }
-
- return $this->createForNamespace($namespace, $contents);
- }
-
- return new Context($namespace, []);
- }
-
- /**
- * Build a Context for a namespace in the provided file contents.
- *
- * @see Context for more information on Contexts.
- *
- * @param string $namespace It does not matter if a `\` precedes the namespace name,
- * this method first normalizes.
- * @param string $fileContents The file's contents to retrieve the aliases from with the given namespace.
- */
- public function createForNamespace(string $namespace, string $fileContents) : Context
- {
- $namespace = trim($namespace, '\\');
- $useStatements = [];
- $currentNamespace = '';
- $tokens = new ArrayIterator(token_get_all($fileContents));
-
- while ($tokens->valid()) {
- switch ($tokens->current()[0]) {
- case T_NAMESPACE:
- $currentNamespace = $this->parseNamespace($tokens);
- break;
- case T_CLASS:
- // Fast-forward the iterator through the class so that any
- // T_USE tokens found within are skipped - these are not
- // valid namespace use statements so should be ignored.
- $braceLevel = 0;
- $firstBraceFound = false;
- while ($tokens->valid() && ($braceLevel > 0 || !$firstBraceFound)) {
- if ($tokens->current() === '{'
- || $tokens->current()[0] === T_CURLY_OPEN
- || $tokens->current()[0] === T_DOLLAR_OPEN_CURLY_BRACES) {
- if (!$firstBraceFound) {
- $firstBraceFound = true;
- }
-
- ++$braceLevel;
- }
-
- if ($tokens->current() === '}') {
- --$braceLevel;
- }
-
- $tokens->next();
- }
- break;
- case T_USE:
- if ($currentNamespace === $namespace) {
- $useStatements = array_merge($useStatements, $this->parseUseStatement($tokens));
- }
- break;
- }
-
- $tokens->next();
- }
-
- return new Context($namespace, $useStatements);
- }
-
- /**
- * Deduce the name from tokens when we are at the T_NAMESPACE token.
- */
- private function parseNamespace(ArrayIterator $tokens) : string
- {
- // skip to the first string or namespace separator
- $this->skipToNextStringOrNamespaceSeparator($tokens);
-
- $name = '';
- while ($tokens->valid() && ($tokens->current()[0] === T_STRING || $tokens->current()[0] === T_NS_SEPARATOR)
- ) {
- $name .= $tokens->current()[1];
- $tokens->next();
- }
-
- return $name;
- }
-
- /**
- * Deduce the names of all imports when we are at the T_USE token.
- *
- * @return string[]
- */
- private function parseUseStatement(ArrayIterator $tokens) : array
- {
- $uses = [];
-
- while (true) {
- $this->skipToNextStringOrNamespaceSeparator($tokens);
-
- $uses = array_merge($uses, $this->extractUseStatements($tokens));
- if ($tokens->current()[0] === self::T_LITERAL_END_OF_USE) {
- return $uses;
- }
- }
-
- return $uses;
- }
-
- /**
- * Fast-forwards the iterator as longs as we don't encounter a T_STRING or T_NS_SEPARATOR token.
- */
- private function skipToNextStringOrNamespaceSeparator(ArrayIterator $tokens) : void
- {
- while ($tokens->valid() && ($tokens->current()[0] !== T_STRING) && ($tokens->current()[0] !== T_NS_SEPARATOR)) {
- $tokens->next();
- }
- }
-
- /**
- * Deduce the namespace name and alias of an import when we are at the T_USE token or have not reached the end of
- * a USE statement yet. This will return a key/value array of the alias => namespace.
- *
- * @return string[]
- *
- * @psalm-suppress TypeDoesNotContainType
- */
- private function extractUseStatements(ArrayIterator $tokens) : array
- {
- $extractedUseStatements = [];
- $groupedNs = '';
- $currentNs = '';
- $currentAlias = '';
- $state = 'start';
-
- while ($tokens->valid()) {
- $currentToken = $tokens->current();
- $tokenId = is_string($currentToken) ? $currentToken : $currentToken[0];
- $tokenValue = is_string($currentToken) ? null : $currentToken[1];
- switch ($state) {
- case 'start':
- switch ($tokenId) {
- case T_STRING:
- case T_NS_SEPARATOR:
- $currentNs .= $tokenValue;
- $currentAlias = $tokenValue;
- break;
- case T_CURLY_OPEN:
- case '{':
- $state = 'grouped';
- $groupedNs = $currentNs;
- break;
- case T_AS:
- $state = 'start-alias';
- break;
- case self::T_LITERAL_USE_SEPARATOR:
- case self::T_LITERAL_END_OF_USE:
- $state = 'end';
- break;
- default:
- break;
- }
- break;
- case 'start-alias':
- switch ($tokenId) {
- case T_STRING:
- $currentAlias = $tokenValue;
- break;
- case self::T_LITERAL_USE_SEPARATOR:
- case self::T_LITERAL_END_OF_USE:
- $state = 'end';
- break;
- default:
- break;
- }
- break;
- case 'grouped':
- switch ($tokenId) {
- case T_STRING:
- case T_NS_SEPARATOR:
- $currentNs .= $tokenValue;
- $currentAlias = $tokenValue;
- break;
- case T_AS:
- $state = 'grouped-alias';
- break;
- case self::T_LITERAL_USE_SEPARATOR:
- $state = 'grouped';
- $extractedUseStatements[$currentAlias] = $currentNs;
- $currentNs = $groupedNs;
- $currentAlias = '';
- break;
- case self::T_LITERAL_END_OF_USE:
- $state = 'end';
- break;
- default:
- break;
- }
- break;
- case 'grouped-alias':
- switch ($tokenId) {
- case T_STRING:
- $currentAlias = $tokenValue;
- break;
- case self::T_LITERAL_USE_SEPARATOR:
- $state = 'grouped';
- $extractedUseStatements[$currentAlias] = $currentNs;
- $currentNs = $groupedNs;
- $currentAlias = '';
- break;
- case self::T_LITERAL_END_OF_USE:
- $state = 'end';
- break;
- default:
- break;
- }
- }
-
- if ($state === 'end') {
- break;
- }
-
- $tokens->next();
- }
-
- if ($groupedNs !== $currentNs) {
- $extractedUseStatements[$currentAlias] = $currentNs;
- }
-
- return $extractedUseStatements;
- }
-}
diff --git a/vendor/phpdocumentor/type-resolver/src/Types/Float_.php b/vendor/phpdocumentor/type-resolver/src/Types/Float_.php
deleted file mode 100644
index 7149c93..0000000
--- a/vendor/phpdocumentor/type-resolver/src/Types/Float_.php
+++ /dev/null
@@ -1,30 +0,0 @@
-realType = $realType;
- }
-
- /**
- * Provide access to the actual type directly, if needed.
- */
- public function getActualType() : Type
- {
- return $this->realType;
- }
-
- /**
- * Returns a rendered output of the Type as it would be used in a DocBlock.
- */
- public function __toString() : string
- {
- return '?' . $this->realType->__toString();
- }
-}
diff --git a/vendor/phpdocumentor/type-resolver/src/Types/Object_.php b/vendor/phpdocumentor/type-resolver/src/Types/Object_.php
deleted file mode 100644
index 3155699..0000000
--- a/vendor/phpdocumentor/type-resolver/src/Types/Object_.php
+++ /dev/null
@@ -1,66 +0,0 @@
-fqsen = $fqsen;
- }
-
- /**
- * Returns the FQSEN associated with this object.
- */
- public function getFqsen() : ?Fqsen
- {
- return $this->fqsen;
- }
-
- public function __toString() : string
- {
- if ($this->fqsen) {
- return (string) $this->fqsen;
- }
-
- return 'object';
- }
-}
diff --git a/vendor/phpdocumentor/type-resolver/src/Types/Parent_.php b/vendor/phpdocumentor/type-resolver/src/Types/Parent_.php
deleted file mode 100644
index 8d7efb6..0000000
--- a/vendor/phpdocumentor/type-resolver/src/Types/Parent_.php
+++ /dev/null
@@ -1,32 +0,0 @@
-
- Copyright (C)
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- , 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
\ No newline at end of file
diff --git a/vendor/phpmailer/phpmailer/README.md b/vendor/phpmailer/phpmailer/README.md
deleted file mode 100644
index d8a0f4e..0000000
--- a/vendor/phpmailer/phpmailer/README.md
+++ /dev/null
@@ -1,221 +0,0 @@
-
-
-# PHPMailer - A full-featured email creation and transfer class for PHP
-
-Build status: [](https://travis-ci.org/PHPMailer/PHPMailer)
-[](https://scrutinizer-ci.com/g/PHPMailer/PHPMailer/)
-[](https://scrutinizer-ci.com/g/PHPMailer/PHPMailer/)
-
-[](https://packagist.org/packages/phpmailer/phpmailer) [](https://packagist.org/packages/phpmailer/phpmailer) [](https://packagist.org/packages/phpmailer/phpmailer) [](https://packagist.org/packages/phpmailer/phpmailer) [](http://phpmailer.github.io/PHPMailer/)
-
-## Class Features
-- Probably the world's most popular code for sending email from PHP!
-- Used by many open-source projects: WordPress, Drupal, 1CRM, SugarCRM, Yii, Joomla! and many more
-- Integrated SMTP support - send without a local mail server
-- Send emails with multiple To, CC, BCC and Reply-to addresses
-- Multipart/alternative emails for mail clients that do not read HTML email
-- Add attachments, including inline
-- Support for UTF-8 content and 8bit, base64, binary, and quoted-printable encodings
-- SMTP authentication with LOGIN, PLAIN, CRAM-MD5, and XOAUTH2 mechanisms over SSL and SMTP+STARTTLS transports
-- Validates email addresses automatically
-- Protect against header injection attacks
-- Error messages in over 50 languages!
-- DKIM and S/MIME signing support
-- Compatible with PHP 5.5 and later
-- Namespaced to prevent name clashes
-- Much more!
-
-## Why you might need it
-Many PHP developers need to send email from their code. The only PHP function that supports this is [`mail()`](https://www.php.net/manual/en/function.mail.php). However, it does not provide any assistance for making use of popular features such as encryption, authentication, HTML messages, and attachments.
-
-Formatting email correctly is surprisingly difficult. There are myriad overlapping RFCs, requiring tight adherence to horribly complicated formatting and encoding rules – the vast majority of code that you'll find online that uses the `mail()` function directly is just plain wrong!
-*Please* don't be tempted to do it yourself – if you don't use PHPMailer, there are many other excellent libraries that you should look at before rolling your own. Try [SwiftMailer](https://swiftmailer.symfony.com/), [Zend/Mail](https://zendframework.github.io/zend-mail/), [ZetaComponents](https://github.com/zetacomponents/Mail) etc.
-
-The PHP `mail()` function usually sends via a local mail server, typically fronted by a `sendmail` binary on Linux, BSD, and macOS platforms, however, Windows usually doesn't include a local mail server; PHPMailer's integrated SMTP implementation allows email sending on Windows platforms without a local mail server.
-
-## License
-This software is distributed under the [LGPL 2.1](http://www.gnu.org/licenses/lgpl-2.1.html) license, along with the [GPL Cooperation Commitment](https://gplcc.github.io/gplcc/). Please read LICENSE for information on the software availability and distribution.
-
-## Installation & loading
-PHPMailer is available on [Packagist](https://packagist.org/packages/phpmailer/phpmailer) (using semantic versioning), and installation via [Composer](https://getcomposer.org) is the recommended way to install PHPMailer. Just add this line to your `composer.json` file:
-
-```json
-"phpmailer/phpmailer": "~6.1"
-```
-
-or run
-
-```sh
-composer require phpmailer/phpmailer
-```
-
-Note that the `vendor` folder and the `vendor/autoload.php` script are generated by Composer; they are not part of PHPMailer.
-
-If you want to use the Gmail XOAUTH2 authentication class, you will also need to add a dependency on the `league/oauth2-client` package in your `composer.json`.
-
-Alternatively, if you're not using Composer, copy the contents of the PHPMailer folder into one of the `include_path` directories specified in your PHP configuration and load each class file manually:
-
-```php
-SMTPDebug = SMTP::DEBUG_SERVER; // Enable verbose debug output
- $mail->isSMTP(); // Send using SMTP
- $mail->Host = 'smtp1.example.com'; // Set the SMTP server to send through
- $mail->SMTPAuth = true; // Enable SMTP authentication
- $mail->Username = 'user@example.com'; // SMTP username
- $mail->Password = 'secret'; // SMTP password
- $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` also accepted
- $mail->Port = 587; // TCP port to connect to
-
- //Recipients
- $mail->setFrom('from@example.com', 'Mailer');
- $mail->addAddress('joe@example.net', 'Joe User'); // Add a recipient
- $mail->addAddress('ellen@example.com'); // Name is optional
- $mail->addReplyTo('info@example.com', 'Information');
- $mail->addCC('cc@example.com');
- $mail->addBCC('bcc@example.com');
-
- // Attachments
- $mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments
- $mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name
-
- // Content
- $mail->isHTML(true); // Set email format to HTML
- $mail->Subject = 'Here is the subject';
- $mail->Body = 'This is the HTML message body in bold!';
- $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
-
- $mail->send();
- echo 'Message has been sent';
-} catch (Exception $e) {
- echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}";
-}
-```
-
-You'll find plenty more to play with in the [examples](https://github.com/PHPMailer/PHPMailer/tree/master/examples) folder.
-
-If you are re-using the instance (e.g. when sending to a mailing list), you may need to clear the recipient list to avoid sending duplicate messages. See [the mailing list example](https://github.com/PHPMailer/PHPMailer/blob/master/examples/mailing_list.phps) for further guidance.
-
-That's it. You should now be ready to use PHPMailer!
-
-## Localization
-PHPMailer defaults to English, but in the [language](https://github.com/PHPMailer/PHPMailer/tree/master/language/) folder you'll find many translations for PHPMailer error messages that you may encounter. Their filenames contain [ISO 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the translations, for example `fr` for French. To specify a language, you need to tell PHPMailer which one to use, like this:
-
-```php
-// To load the French version
-$mail->setLanguage('fr', '/optional/path/to/language/directory/');
-```
-
-We welcome corrections and new languages - if you're looking for corrections to do, run the [PHPMailerLangTest.php](https://github.com/PHPMailer/PHPMailer/tree/master/test/PHPMailerLangTest.php) script in the tests folder and it will show any missing translations.
-
-## Documentation
-Start reading at the [GitHub wiki](https://github.com/PHPMailer/PHPMailer/wiki). If you're having trouble, this should be the first place you look as it's the most frequently updated.
-
-Examples of how to use PHPMailer for common scenarios can be found in the [examples](https://github.com/PHPMailer/PHPMailer/tree/master/examples) folder. If you're looking for a good starting point, we recommend you start with [the Gmail example](https://github.com/PHPMailer/PHPMailer/tree/master/examples/gmail.phps).
-
-Note that in order to reduce PHPMailer's deployed code footprint, the examples are no longer included if you load PHPMailer via Composer or via [GitHub's zip file download](https://github.com/PHPMailer/PHPMailer/archive/master.zip), so you'll need to either clone the git repository or use the above links to get to the examples directly.
-
-Complete generated API documentation is [available online](http://phpmailer.github.io/PHPMailer/).
-
-You can generate complete API-level documentation by running `phpdoc` in the top-level folder, and documentation will appear in the `docs` folder, though you'll need to have [PHPDocumentor](http://www.phpdoc.org) installed. You may find [the unit tests](https://github.com/PHPMailer/PHPMailer/tree/master/test/phpmailerTest.php) a good source of how to do various operations such as encryption.
-
-If the documentation doesn't cover what you need, search the [many questions on Stack Overflow](http://stackoverflow.com/questions/tagged/phpmailer), and before you ask a question about "SMTP Error: Could not connect to SMTP host.", [read the troubleshooting guide](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting).
-
-## Tests
-There is a PHPUnit test script in the [test](https://github.com/PHPMailer/PHPMailer/tree/master/test/) folder. PHPMailer uses PHPUnit 4.8 - we would use 5.x but we need to run on PHP 5.5.
-
-Build status: [](https://travis-ci.org/PHPMailer/PHPMailer)
-
-If this isn't passing, is there something you can do to help?
-
-## Security
-Please disclose any vulnerabilities found responsibly - report any security problems found to the maintainers privately.
-
-PHPMailer versions prior to 5.2.22 (released January 9th 2017) have a local file disclosure vulnerability, [CVE-2017-5223](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-5223). If content passed into `msgHTML()` is sourced from unfiltered user input, relative paths can map to absolute local file paths and added as attachments. Also note that `addAttachment` (just like `file_get_contents`, `passthru`, `unlink`, etc) should not be passed user-sourced params either! Reported by Yongxiang Li of Asiasecurity.
-
-PHPMailer versions prior to 5.2.20 (released December 28th 2016) are vulnerable to [CVE-2016-10045](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-10045) a remote code execution vulnerability, responsibly reported by [Dawid Golunski](https://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10045-Vuln-Patch-Bypass.html), and patched by Paul Buonopane (@Zenexer).
-
-PHPMailer versions prior to 5.2.18 (released December 2016) are vulnerable to [CVE-2016-10033](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-10033) a critical remote code execution vulnerability, responsibly reported by [Dawid Golunski](http://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10033-Vuln.html).
-
-See [SECURITY](https://github.com/PHPMailer/PHPMailer/tree/master/SECURITY.md) for more detail on security issues.
-
-## Contributing
-Please submit bug reports, suggestions and pull requests to the [GitHub issue tracker](https://github.com/PHPMailer/PHPMailer/issues).
-
-We're particularly interested in fixing edge-cases, expanding test coverage and updating translations.
-
-If you found a mistake in the docs, or want to add something, go ahead and amend the wiki - anyone can edit it.
-
-If you have git clones from prior to the move to the PHPMailer GitHub organisation, you'll need to update any remote URLs referencing the old GitHub location with a command like this from within your clone:
-
-```sh
-git remote set-url upstream https://github.com/PHPMailer/PHPMailer.git
-```
-
-Please *don't* use the SourceForge or Google Code projects any more; they are obsolete and no longer maintained.
-
-## Sponsorship
-Development time and resources for PHPMailer are provided by [Smartmessages.net](https://info.smartmessages.net/), a powerful email marketing system.
-
-
-
-Other contributions are gladly received, whether in beer 🍺, T-shirts 👕, Amazon wishlist raids, or cold, hard cash 💰. If you'd like to donate to say "thank you" to maintainers or contributors, please contact them through individual profile pages via [the contributors page](https://github.com/PHPMailer/PHPMailer/graphs/contributors).
-
-## Changelog
-See [changelog](changelog.md).
-
-## History
-- PHPMailer was originally written in 2001 by Brent R. Matzelle as a [SourceForge project](http://sourceforge.net/projects/phpmailer/).
-- Marcus Bointon (coolbru on SF) and Andy Prevost (codeworxtech) took over the project in 2004.
-- Became an Apache incubator project on Google Code in 2010, managed by Jim Jagielski.
-- Marcus created his fork on [GitHub](https://github.com/Synchro/PHPMailer) in 2008.
-- Jim and Marcus decide to join forces and use GitHub as the canonical and official repo for PHPMailer in 2013.
-- PHPMailer moves to the [PHPMailer organisation](https://github.com/PHPMailer) on GitHub in 2013.
-
-### What's changed since moving from SourceForge?
-- Official successor to the SourceForge and Google Code projects.
-- Test suite.
-- Continuous integration with Travis-CI.
-- Composer support.
-- Public development.
-- Additional languages and language strings.
-- CRAM-MD5 authentication support.
-- Preserves full repo history of authors, commits and branches from the original SourceForge project.
diff --git a/vendor/phpmailer/phpmailer/SECURITY.md b/vendor/phpmailer/phpmailer/SECURITY.md
deleted file mode 100644
index 5e917cd..0000000
--- a/vendor/phpmailer/phpmailer/SECURITY.md
+++ /dev/null
@@ -1,28 +0,0 @@
-# Security notices relating to PHPMailer
-
-Please disclose any vulnerabilities found responsibly - report any security problems found to the maintainers privately.
-
-PHPMailer versions prior to 6.0.6 and 5.2.27 are vulnerable to an object injection attack by passing `phar://` paths into `addAttachment()` and other functions that may receive unfiltered local paths, possibly leading to RCE. Recorded as [CVE-2018-19296](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2018-19296). See [this article](https://knasmueller.net/5-answers-about-php-phar-exploitation) for more info on this type of vulnerability. Mitigated by blocking the use of paths containing URL-protocol style prefixes such as `phar://`. Reported by Sehun Oh of cyberone.kr.
-
-PHPMailer versions prior to 5.2.24 (released July 26th 2017) have an XSS vulnerability in one of the code examples, [CVE-2017-11503](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-11503). The `code_generator.phps` example did not filter user input prior to output. This file is distributed with a `.phps` extension, so it it not normally executable unless it is explicitly renamed, and the file is not included when PHPMailer is loaded through composer, so it is safe by default. There was also an undisclosed potential XSS vulnerability in the default exception handler (unused by default). Patches for both issues kindly provided by Patrick Monnerat of the Fedora Project.
-
-PHPMailer versions prior to 5.2.22 (released January 9th 2017) have a local file disclosure vulnerability, [CVE-2017-5223](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-5223). If content passed into `msgHTML()` is sourced from unfiltered user input, relative paths can map to absolute local file paths and added as attachments. Also note that `addAttachment` (just like `file_get_contents`, `passthru`, `unlink`, etc) should not be passed user-sourced params either! Reported by Yongxiang Li of Asiasecurity.
-
-PHPMailer versions prior to 5.2.20 (released December 28th 2016) are vulnerable to [CVE-2016-10045](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-10045) a remote code execution vulnerability, responsibly reported by [Dawid Golunski](https://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10045-Vuln-Patch-Bypass.html), and patched by Paul Buonopane (@Zenexer).
-
-PHPMailer versions prior to 5.2.18 (released December 2016) are vulnerable to [CVE-2016-10033](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-10033) a remote code execution vulnerability, responsibly reported by [Dawid Golunski](http://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10033-Vuln.html).
-
-PHPMailer versions prior to 5.2.14 (released November 2015) are vulnerable to [CVE-2015-8476](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2015-8476) an SMTP CRLF injection bug permitting arbitrary message sending.
-
-PHPMailer versions prior to 5.2.10 (released May 2015) are vulnerable to [CVE-2008-5619](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2008-5619), a remote code execution vulnerability in the bundled html2text library. This file was removed in 5.2.10, so if you are using a version prior to that and make use of the html2text function, it's vitally important that you upgrade and remove this file.
-
-PHPMailer versions prior to 2.0.7 and 2.2.1 are vulnerable to [CVE-2012-0796](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-0796), an email header injection attack.
-
-Joomla 1.6.0 uses PHPMailer in an unsafe way, allowing it to reveal local file paths, reported in [CVE-2011-3747](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2011-3747).
-
-PHPMailer didn't sanitise the `$lang_path` parameter in `SetLanguage`. This wasn't a problem in itself, but some apps (PHPClassifieds, ATutor) also failed to sanitise user-provided parameters passed to it, permitting semi-arbitrary local file inclusion, reported in [CVE-2010-4914](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-4914), [CVE-2007-2021](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2007-2021) and [CVE-2006-5734](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2006-5734).
-
-PHPMailer 1.7.2 and earlier contained a possible DDoS vulnerability reported in [CVE-2005-1807](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2005-1807).
-
-PHPMailer 1.7 and earlier (June 2003) have a possible vulnerability in the `SendmailSend` method where shell commands may not be sanitised. Reported in [CVE-2007-3215](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2007-3215).
-
diff --git a/vendor/phpmailer/phpmailer/VERSION b/vendor/phpmailer/phpmailer/VERSION
deleted file mode 100644
index d7ff925..0000000
--- a/vendor/phpmailer/phpmailer/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-6.1.3
\ No newline at end of file
diff --git a/vendor/phpmailer/phpmailer/composer.json b/vendor/phpmailer/phpmailer/composer.json
deleted file mode 100644
index fd0695c..0000000
--- a/vendor/phpmailer/phpmailer/composer.json
+++ /dev/null
@@ -1,51 +0,0 @@
-{
- "name": "phpmailer/phpmailer",
- "type": "library",
- "description": "PHPMailer is a full-featured email creation and transfer class for PHP",
- "authors": [
- {
- "name": "Marcus Bointon",
- "email": "phpmailer@synchromedia.co.uk"
- },
- {
- "name": "Jim Jagielski",
- "email": "jimjag@gmail.com"
- },
- {
- "name": "Andy Prevost",
- "email": "codeworxtech@users.sourceforge.net"
- },
- {
- "name": "Brent R. Matzelle"
- }
- ],
- "require": {
- "php": ">=5.5.0",
- "ext-ctype": "*",
- "ext-filter": "*"
- },
- "require-dev": {
- "friendsofphp/php-cs-fixer": "^2.2",
- "phpunit/phpunit": "^4.8 || ^5.7",
- "doctrine/annotations": "^1.2"
- },
- "suggest": {
- "psr/log": "For optional PSR-3 debug logging",
- "league/oauth2-google": "Needed for Google XOAUTH2 authentication",
- "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication",
- "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication",
- "ext-mbstring": "Needed to send email in multibyte encoding charset",
- "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)"
- },
- "autoload": {
- "psr-4": {
- "PHPMailer\\PHPMailer\\": "src/"
- }
- },
- "autoload-dev": {
- "psr-4": {
- "PHPMailer\\Test\\": "test/"
- }
- },
- "license": "LGPL-2.1-only"
-}
diff --git a/vendor/phpmailer/phpmailer/get_oauth_token.php b/vendor/phpmailer/phpmailer/get_oauth_token.php
deleted file mode 100644
index 1237b57..0000000
--- a/vendor/phpmailer/phpmailer/get_oauth_token.php
+++ /dev/null
@@ -1,144 +0,0 @@
-
- * @author Jim Jagielski (jimjag)
- * @author Andy Prevost (codeworxtech)
- * @author Brent R. Matzelle (original founder)
- * @copyright 2012 - 2017 Marcus Bointon
- * @copyright 2010 - 2012 Jim Jagielski
- * @copyright 2004 - 2009 Andy Prevost
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
- * @note This program is distributed in the hope that it will be useful - WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.
- */
-/**
- * Get an OAuth2 token from an OAuth2 provider.
- * * Install this script on your server so that it's accessible
- * as [https/http]:////get_oauth_token.php
- * e.g.: http://localhost/phpmailer/get_oauth_token.php
- * * Ensure dependencies are installed with 'composer install'
- * * Set up an app in your Google/Yahoo/Microsoft account
- * * Set the script address as the app's redirect URL
- * If no refresh token is obtained when running this file,
- * revoke access to your app and run the script again.
- */
-
-namespace PHPMailer\PHPMailer;
-
-/**
- * Aliases for League Provider Classes
- * Make sure you have added these to your composer.json and run `composer install`
- * Plenty to choose from here:
- * @see http://oauth2-client.thephpleague.com/providers/thirdparty/
- */
-// @see https://github.com/thephpleague/oauth2-google
-use League\OAuth2\Client\Provider\Google;
-// @see https://packagist.org/packages/hayageek/oauth2-yahoo
-use Hayageek\OAuth2\Client\Provider\Yahoo;
-// @see https://github.com/stevenmaguire/oauth2-microsoft
-use Stevenmaguire\OAuth2\Client\Provider\Microsoft;
-
-if (!isset($_GET['code']) && !isset($_GET['provider'])) {
-?>
-
-Select Provider:
-Google
-Yahoo
-Microsoft/Outlook/Hotmail/Live/Office365
-
-
- $clientId,
- 'clientSecret' => $clientSecret,
- 'redirectUri' => $redirectUri,
- 'accessType' => 'offline'
-];
-
-$options = [];
-$provider = null;
-
-switch ($providerName) {
- case 'Google':
- $provider = new Google($params);
- $options = [
- 'scope' => [
- 'https://mail.google.com/'
- ]
- ];
- break;
- case 'Yahoo':
- $provider = new Yahoo($params);
- break;
- case 'Microsoft':
- $provider = new Microsoft($params);
- $options = [
- 'scope' => [
- 'wl.imap',
- 'wl.offline_access'
- ]
- ];
- break;
-}
-
-if (null === $provider) {
- exit('Provider missing');
-}
-
-if (!isset($_GET['code'])) {
- // If we don't have an authorization code then get one
- $authUrl = $provider->getAuthorizationUrl($options);
- $_SESSION['oauth2state'] = $provider->getState();
- header('Location: ' . $authUrl);
- exit;
-// Check given state against previously stored one to mitigate CSRF attack
-} elseif (empty($_GET['state']) || ($_GET['state'] !== $_SESSION['oauth2state'])) {
- unset($_SESSION['oauth2state']);
- unset($_SESSION['provider']);
- exit('Invalid state');
-} else {
- unset($_SESSION['provider']);
- // Try to get an access token (using the authorization code grant)
- $token = $provider->getAccessToken(
- 'authorization_code',
- [
- 'code' => $_GET['code']
- ]
- );
- // Use this to interact with an API on the users behalf
- // Use this to get a new access token if the old one expires
- echo 'Refresh Token: ', $token->getRefreshToken();
-}
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-af.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-af.php
deleted file mode 100644
index 3c42d78..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-af.php
+++ /dev/null
@@ -1,25 +0,0 @@
-
- */
-
-$PHPMAILER_LANG['authenticate'] = 'SMTP -ի սխալ: չհաջողվեց ստուգել իսկությունը.';
-$PHPMAILER_LANG['connect_host'] = 'SMTP -ի սխալ: չհաջողվեց կապ հաստատել SMTP սերվերի հետ.';
-$PHPMAILER_LANG['data_not_accepted'] = 'SMTP -ի սխալ: տվյալները ընդունված չեն.';
-$PHPMAILER_LANG['empty_message'] = 'Հաղորդագրությունը դատարկ է';
-$PHPMAILER_LANG['encoding'] = 'Կոդավորման անհայտ տեսակ: ';
-$PHPMAILER_LANG['execute'] = 'Չհաջողվեց իրականացնել հրամանը: ';
-$PHPMAILER_LANG['file_access'] = 'Ֆայլը հասանելի չէ: ';
-$PHPMAILER_LANG['file_open'] = 'Ֆայլի սխալ: ֆայլը չհաջողվեց բացել: ';
-$PHPMAILER_LANG['from_failed'] = 'Ուղարկողի հետևյալ հասցեն սխալ է: ';
-$PHPMAILER_LANG['instantiate'] = 'Հնարավոր չէ կանչել mail ֆունկցիան.';
-$PHPMAILER_LANG['invalid_address'] = 'Հասցեն սխալ է: ';
-$PHPMAILER_LANG['mailer_not_supported'] = ' փոստային սերվերի հետ չի աշխատում.';
-$PHPMAILER_LANG['provide_address'] = 'Անհրաժեշտ է տրամադրել գոնե մեկ ստացողի e-mail հասցե.';
-$PHPMAILER_LANG['recipients_failed'] = 'SMTP -ի սխալ: չի հաջողվել ուղարկել հետևյալ ստացողների հասցեներին: ';
-$PHPMAILER_LANG['signing'] = 'Ստորագրման սխալ: ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP -ի connect() ֆունկցիան չի հաջողվել';
-$PHPMAILER_LANG['smtp_error'] = 'SMTP սերվերի սխալ: ';
-$PHPMAILER_LANG['variable_set'] = 'Չի հաջողվում ստեղծել կամ վերափոխել փոփոխականը: ';
-$PHPMAILER_LANG['extension_missing'] = 'Հավելվածը բացակայում է: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ar.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ar.php
deleted file mode 100644
index 865d0b7..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ar.php
+++ /dev/null
@@ -1,27 +0,0 @@
-
- */
-
-$PHPMAILER_LANG['authenticate'] = 'خطأ SMTP : لا يمكن تأكيد الهوية.';
-$PHPMAILER_LANG['connect_host'] = 'خطأ SMTP: لا يمكن الاتصال بالخادم SMTP.';
-$PHPMAILER_LANG['data_not_accepted'] = 'خطأ SMTP: لم يتم قبول المعلومات .';
-$PHPMAILER_LANG['empty_message'] = 'نص الرسالة فارغ';
-$PHPMAILER_LANG['encoding'] = 'ترميز غير معروف: ';
-$PHPMAILER_LANG['execute'] = 'لا يمكن تنفيذ : ';
-$PHPMAILER_LANG['file_access'] = 'لا يمكن الوصول للملف: ';
-$PHPMAILER_LANG['file_open'] = 'خطأ في الملف: لا يمكن فتحه: ';
-$PHPMAILER_LANG['from_failed'] = 'خطأ على مستوى عنوان المرسل : ';
-$PHPMAILER_LANG['instantiate'] = 'لا يمكن توفير خدمة البريد.';
-$PHPMAILER_LANG['invalid_address'] = 'الإرسال غير ممكن لأن عنوان البريد الإلكتروني غير صالح: ';
-$PHPMAILER_LANG['mailer_not_supported'] = ' برنامج الإرسال غير مدعوم.';
-$PHPMAILER_LANG['provide_address'] = 'يجب توفير عنوان البريد الإلكتروني لمستلم واحد على الأقل.';
-$PHPMAILER_LANG['recipients_failed'] = 'خطأ SMTP: الأخطاء التالية ' .
- 'فشل في الارسال لكل من : ';
-$PHPMAILER_LANG['signing'] = 'خطأ في التوقيع: ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() غير ممكن.';
-$PHPMAILER_LANG['smtp_error'] = 'خطأ على مستوى الخادم SMTP: ';
-$PHPMAILER_LANG['variable_set'] = 'لا يمكن تعيين أو إعادة تعيين متغير: ';
-$PHPMAILER_LANG['extension_missing'] = 'الإضافة غير موجودة: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-az.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-az.php
deleted file mode 100644
index 3749d83..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-az.php
+++ /dev/null
@@ -1,26 +0,0 @@
-
- */
-
-$PHPMAILER_LANG['authenticate'] = 'SMTP Greška: Neuspjela prijava.';
-$PHPMAILER_LANG['connect_host'] = 'SMTP Greška: Nije moguće spojiti se sa SMTP serverom.';
-$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Greška: Podatci nisu prihvaćeni.';
-$PHPMAILER_LANG['empty_message'] = 'Sadržaj poruke je prazan.';
-$PHPMAILER_LANG['encoding'] = 'Nepoznata kriptografija: ';
-$PHPMAILER_LANG['execute'] = 'Nije moguće izvršiti naredbu: ';
-$PHPMAILER_LANG['file_access'] = 'Nije moguće pristupiti datoteci: ';
-$PHPMAILER_LANG['file_open'] = 'Nije moguće otvoriti datoteku: ';
-$PHPMAILER_LANG['from_failed'] = 'SMTP Greška: Slanje sa navedenih e-mail adresa nije uspjelo: ';
-$PHPMAILER_LANG['recipients_failed'] = 'SMTP Greška: Slanje na navedene e-mail adrese nije uspjelo: ';
-$PHPMAILER_LANG['instantiate'] = 'Ne mogu pokrenuti mail funkcionalnost.';
-$PHPMAILER_LANG['invalid_address'] = 'E-mail nije poslan. Neispravna e-mail adresa: ';
-$PHPMAILER_LANG['mailer_not_supported'] = ' mailer nije podržan.';
-$PHPMAILER_LANG['provide_address'] = 'Definišite barem jednu adresu primaoca.';
-$PHPMAILER_LANG['signing'] = 'Greška prilikom prijave: ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'Spajanje na SMTP server nije uspjelo.';
-$PHPMAILER_LANG['smtp_error'] = 'SMTP greška: ';
-$PHPMAILER_LANG['variable_set'] = 'Nije moguće postaviti varijablu ili je vratiti nazad: ';
-$PHPMAILER_LANG['extension_missing'] = 'Nedostaje ekstenzija: ';
\ No newline at end of file
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-be.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-be.php
deleted file mode 100644
index e2f98f0..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-be.php
+++ /dev/null
@@ -1,26 +0,0 @@
-
- */
-
-$PHPMAILER_LANG['authenticate'] = 'Памылка SMTP: памылка ідэнтыфікацыі.';
-$PHPMAILER_LANG['connect_host'] = 'Памылка SMTP: нельга ўстанавіць сувязь з SMTP-серверам.';
-$PHPMAILER_LANG['data_not_accepted'] = 'Памылка SMTP: звесткі непрынятыя.';
-$PHPMAILER_LANG['empty_message'] = 'Пустое паведамленне.';
-$PHPMAILER_LANG['encoding'] = 'Невядомая кадыроўка тэксту: ';
-$PHPMAILER_LANG['execute'] = 'Нельга выканаць каманду: ';
-$PHPMAILER_LANG['file_access'] = 'Няма доступу да файла: ';
-$PHPMAILER_LANG['file_open'] = 'Нельга адкрыць файл: ';
-$PHPMAILER_LANG['from_failed'] = 'Няправільны адрас адпраўніка: ';
-$PHPMAILER_LANG['instantiate'] = 'Нельга прымяніць функцыю mail().';
-$PHPMAILER_LANG['invalid_address'] = 'Нельга даслаць паведамленне, няправільны email атрымальніка: ';
-$PHPMAILER_LANG['provide_address'] = 'Запоўніце, калі ласка, правільны email атрымальніка.';
-$PHPMAILER_LANG['mailer_not_supported'] = ' - паштовы сервер не падтрымліваецца.';
-$PHPMAILER_LANG['recipients_failed'] = 'Памылка SMTP: няправільныя атрымальнікі: ';
-$PHPMAILER_LANG['signing'] = 'Памылка подпісу паведамлення: ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'Памылка сувязі з SMTP-серверам.';
-$PHPMAILER_LANG['smtp_error'] = 'Памылка SMTP: ';
-$PHPMAILER_LANG['variable_set'] = 'Нельга ўстанавіць або перамяніць значэнне пераменнай: ';
-//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-bg.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-bg.php
deleted file mode 100644
index b22941f..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-bg.php
+++ /dev/null
@@ -1,26 +0,0 @@
-
- */
-
-$PHPMAILER_LANG['authenticate'] = 'SMTP грешка: Не може да се удостовери пред сървъра.';
-$PHPMAILER_LANG['connect_host'] = 'SMTP грешка: Не може да се свърже с SMTP хоста.';
-$PHPMAILER_LANG['data_not_accepted'] = 'SMTP грешка: данните не са приети.';
-$PHPMAILER_LANG['empty_message'] = 'Съдържанието на съобщението е празно';
-$PHPMAILER_LANG['encoding'] = 'Неизвестно кодиране: ';
-$PHPMAILER_LANG['execute'] = 'Не може да се изпълни: ';
-$PHPMAILER_LANG['file_access'] = 'Няма достъп до файл: ';
-$PHPMAILER_LANG['file_open'] = 'Файлова грешка: Не може да се отвори файл: ';
-$PHPMAILER_LANG['from_failed'] = 'Следните адреси за подател са невалидни: ';
-$PHPMAILER_LANG['instantiate'] = 'Не може да се инстанцира функцията mail.';
-$PHPMAILER_LANG['invalid_address'] = 'Невалиден адрес: ';
-$PHPMAILER_LANG['mailer_not_supported'] = ' - пощенски сървър не се поддържа.';
-$PHPMAILER_LANG['provide_address'] = 'Трябва да предоставите поне един email адрес за получател.';
-$PHPMAILER_LANG['recipients_failed'] = 'SMTP грешка: Следните адреси за Получател са невалидни: ';
-$PHPMAILER_LANG['signing'] = 'Грешка при подписване: ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP провален connect().';
-$PHPMAILER_LANG['smtp_error'] = 'SMTP сървърна грешка: ';
-$PHPMAILER_LANG['variable_set'] = 'Не може да се установи или възстанови променлива: ';
-$PHPMAILER_LANG['extension_missing'] = 'Липсва разширение: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ca.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ca.php
deleted file mode 100644
index 4117596..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ca.php
+++ /dev/null
@@ -1,26 +0,0 @@
-
- */
-
-$PHPMAILER_LANG['authenticate'] = 'Error SMTP: No s’ha pogut autenticar.';
-$PHPMAILER_LANG['connect_host'] = 'Error SMTP: No es pot connectar al servidor SMTP.';
-$PHPMAILER_LANG['data_not_accepted'] = 'Error SMTP: Dades no acceptades.';
-$PHPMAILER_LANG['empty_message'] = 'El cos del missatge està buit.';
-$PHPMAILER_LANG['encoding'] = 'Codificació desconeguda: ';
-$PHPMAILER_LANG['execute'] = 'No es pot executar: ';
-$PHPMAILER_LANG['file_access'] = 'No es pot accedir a l’arxiu: ';
-$PHPMAILER_LANG['file_open'] = 'Error d’Arxiu: No es pot obrir l’arxiu: ';
-$PHPMAILER_LANG['from_failed'] = 'La(s) següent(s) adreces de remitent han fallat: ';
-$PHPMAILER_LANG['instantiate'] = 'No s’ha pogut crear una instància de la funció Mail.';
-$PHPMAILER_LANG['invalid_address'] = 'Adreça d’email invalida: ';
-$PHPMAILER_LANG['mailer_not_supported'] = ' mailer no està suportat';
-$PHPMAILER_LANG['provide_address'] = 'S’ha de proveir almenys una adreça d’email com a destinatari.';
-$PHPMAILER_LANG['recipients_failed'] = 'Error SMTP: Els següents destinataris han fallat: ';
-$PHPMAILER_LANG['signing'] = 'Error al signar: ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'Ha fallat el SMTP Connect().';
-$PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: ';
-$PHPMAILER_LANG['variable_set'] = 'No s’ha pogut establir o restablir la variable: ';
-//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ch.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ch.php
deleted file mode 100644
index 4fda6b8..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ch.php
+++ /dev/null
@@ -1,26 +0,0 @@
-
- */
-
-$PHPMAILER_LANG['authenticate'] = 'SMTP 错误:身份验证失败。';
-$PHPMAILER_LANG['connect_host'] = 'SMTP 错误: 不能连接SMTP主机。';
-$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误: 数据不可接受。';
-//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
-$PHPMAILER_LANG['encoding'] = '未知编码:';
-$PHPMAILER_LANG['execute'] = '不能执行: ';
-$PHPMAILER_LANG['file_access'] = '不能访问文件:';
-$PHPMAILER_LANG['file_open'] = '文件错误:不能打开文件:';
-$PHPMAILER_LANG['from_failed'] = '下面的发送地址邮件发送失败了: ';
-$PHPMAILER_LANG['instantiate'] = '不能实现mail方法。';
-//$PHPMAILER_LANG['invalid_address'] = 'Invalid address: ';
-$PHPMAILER_LANG['mailer_not_supported'] = ' 您所选择的发送邮件的方法并不支持。';
-$PHPMAILER_LANG['provide_address'] = '您必须提供至少一个 收信人的email地址。';
-$PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误: 下面的 收件人失败了: ';
-//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
-//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
-//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
-//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
-//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-cs.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-cs.php
deleted file mode 100644
index 1160cf0..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-cs.php
+++ /dev/null
@@ -1,25 +0,0 @@
-
- */
-
-$PHPMAILER_LANG['authenticate'] = 'SMTP fejl: Kunne ikke logge på.';
-$PHPMAILER_LANG['connect_host'] = 'SMTP fejl: Kunne ikke tilslutte SMTP serveren.';
-$PHPMAILER_LANG['data_not_accepted'] = 'SMTP fejl: Data kunne ikke accepteres.';
-//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
-$PHPMAILER_LANG['encoding'] = 'Ukendt encode-format: ';
-$PHPMAILER_LANG['execute'] = 'Kunne ikke køre: ';
-$PHPMAILER_LANG['file_access'] = 'Ingen adgang til fil: ';
-$PHPMAILER_LANG['file_open'] = 'Fil fejl: Kunne ikke åbne filen: ';
-$PHPMAILER_LANG['from_failed'] = 'Følgende afsenderadresse er forkert: ';
-$PHPMAILER_LANG['instantiate'] = 'Kunne ikke initialisere email funktionen.';
-//$PHPMAILER_LANG['invalid_address'] = 'Invalid address: ';
-$PHPMAILER_LANG['mailer_not_supported'] = ' mailer understøttes ikke.';
-$PHPMAILER_LANG['provide_address'] = 'Du skal indtaste mindst en modtagers emailadresse.';
-$PHPMAILER_LANG['recipients_failed'] = 'SMTP fejl: Følgende modtagere er forkerte: ';
-//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
-//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
-//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
-//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
-//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-de.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-de.php
deleted file mode 100644
index aa987a9..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-de.php
+++ /dev/null
@@ -1,25 +0,0 @@
-
- */
-
-$PHPMAILER_LANG['authenticate'] = 'Error SMTP: Imposible autentificar.';
-$PHPMAILER_LANG['connect_host'] = 'Error SMTP: Imposible conectar al servidor SMTP.';
-$PHPMAILER_LANG['data_not_accepted'] = 'Error SMTP: Datos no aceptados.';
-$PHPMAILER_LANG['empty_message'] = 'El cuerpo del mensaje está vacío.';
-$PHPMAILER_LANG['encoding'] = 'Codificación desconocida: ';
-$PHPMAILER_LANG['execute'] = 'Imposible ejecutar: ';
-$PHPMAILER_LANG['file_access'] = 'Imposible acceder al archivo: ';
-$PHPMAILER_LANG['file_open'] = 'Error de Archivo: Imposible abrir el archivo: ';
-$PHPMAILER_LANG['from_failed'] = 'La(s) siguiente(s) direcciones de remitente fallaron: ';
-$PHPMAILER_LANG['instantiate'] = 'Imposible crear una instancia de la función Mail.';
-$PHPMAILER_LANG['invalid_address'] = 'Imposible enviar: dirección de email inválido: ';
-$PHPMAILER_LANG['mailer_not_supported'] = ' mailer no está soportado.';
-$PHPMAILER_LANG['provide_address'] = 'Debe proporcionar al menos una dirección de email de destino.';
-$PHPMAILER_LANG['recipients_failed'] = 'Error SMTP: Los siguientes destinos fallaron: ';
-$PHPMAILER_LANG['signing'] = 'Error al firmar: ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falló.';
-$PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: ';
-$PHPMAILER_LANG['variable_set'] = 'No se pudo configurar la variable: ';
-$PHPMAILER_LANG['extension_missing'] = 'Extensión faltante: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-et.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-et.php
deleted file mode 100644
index 7e06da1..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-et.php
+++ /dev/null
@@ -1,27 +0,0 @@
-
- */
-
-$PHPMAILER_LANG['authenticate'] = 'SMTP Viga: Autoriseerimise viga.';
-$PHPMAILER_LANG['connect_host'] = 'SMTP Viga: Ei õnnestunud luua ühendust SMTP serveriga.';
-$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Viga: Vigased andmed.';
-$PHPMAILER_LANG['empty_message'] = 'Tühi kirja sisu';
-$PHPMAILER_LANG["encoding"] = 'Tundmatu kodeering: ';
-$PHPMAILER_LANG['execute'] = 'Tegevus ebaõnnestus: ';
-$PHPMAILER_LANG['file_access'] = 'Pole piisavalt õiguseid järgneva faili avamiseks: ';
-$PHPMAILER_LANG['file_open'] = 'Faili Viga: Faili avamine ebaõnnestus: ';
-$PHPMAILER_LANG['from_failed'] = 'Järgnev saatja e-posti aadress on vigane: ';
-$PHPMAILER_LANG['instantiate'] = 'mail funktiooni käivitamine ebaõnnestus.';
-$PHPMAILER_LANG['invalid_address'] = 'Saatmine peatatud, e-posti address vigane: ';
-$PHPMAILER_LANG['provide_address'] = 'Te peate määrama vähemalt ühe saaja e-posti aadressi.';
-$PHPMAILER_LANG['mailer_not_supported'] = ' maileri tugi puudub.';
-$PHPMAILER_LANG['recipients_failed'] = 'SMTP Viga: Järgnevate saajate e-posti aadressid on vigased: ';
-$PHPMAILER_LANG["signing"] = 'Viga allkirjastamisel: ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() ebaõnnestus.';
-$PHPMAILER_LANG['smtp_error'] = 'SMTP serveri viga: ';
-$PHPMAILER_LANG['variable_set'] = 'Ei õnnestunud määrata või lähtestada muutujat: ';
-$PHPMAILER_LANG['extension_missing'] = 'Nõutud laiendus on puudu: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-fa.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-fa.php
deleted file mode 100644
index 8aa0ad2..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-fa.php
+++ /dev/null
@@ -1,27 +0,0 @@
-
- * @author Mohammad Hossein Mojtahedi
- */
-
-$PHPMAILER_LANG['authenticate'] = 'خطای SMTP: احراز هویت با شکست مواجه شد.';
-$PHPMAILER_LANG['connect_host'] = 'خطای SMTP: اتصال به سرور SMTP برقرار نشد.';
-$PHPMAILER_LANG['data_not_accepted'] = 'خطای SMTP: دادهها نادرست هستند.';
-$PHPMAILER_LANG['empty_message'] = 'بخش متن پیام خالی است.';
-$PHPMAILER_LANG['encoding'] = 'کدگذاری ناشناخته: ';
-$PHPMAILER_LANG['execute'] = 'امکان اجرا وجود ندارد: ';
-$PHPMAILER_LANG['file_access'] = 'امکان دسترسی به فایل وجود ندارد: ';
-$PHPMAILER_LANG['file_open'] = 'خطای File: امکان بازکردن فایل وجود ندارد: ';
-$PHPMAILER_LANG['from_failed'] = 'آدرس فرستنده اشتباه است: ';
-$PHPMAILER_LANG['instantiate'] = 'امکان معرفی تابع ایمیل وجود ندارد.';
-$PHPMAILER_LANG['invalid_address'] = 'آدرس ایمیل معتبر نیست: ';
-$PHPMAILER_LANG['mailer_not_supported'] = ' mailer پشتیبانی نمیشود.';
-$PHPMAILER_LANG['provide_address'] = 'باید حداقل یک آدرس گیرنده وارد کنید.';
-$PHPMAILER_LANG['recipients_failed'] = 'خطای SMTP: ارسال به آدرس گیرنده با خطا مواجه شد: ';
-$PHPMAILER_LANG['signing'] = 'خطا در امضا: ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'خطا در اتصال به SMTP.';
-$PHPMAILER_LANG['smtp_error'] = 'خطا در SMTP Server: ';
-$PHPMAILER_LANG['variable_set'] = 'امکان ارسال یا ارسال مجدد متغیرها وجود ندارد: ';
-$PHPMAILER_LANG['extension_missing'] = 'افزونه موجود نیست: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-fi.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-fi.php
deleted file mode 100644
index ec4e752..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-fi.php
+++ /dev/null
@@ -1,27 +0,0 @@
-
- */
-
-$PHPMAILER_LANG['authenticate'] = 'SMTP feilur: Kundi ikki góðkenna.';
-$PHPMAILER_LANG['connect_host'] = 'SMTP feilur: Kundi ikki knýta samband við SMTP vert.';
-$PHPMAILER_LANG['data_not_accepted'] = 'SMTP feilur: Data ikki góðkent.';
-//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
-$PHPMAILER_LANG['encoding'] = 'Ókend encoding: ';
-$PHPMAILER_LANG['execute'] = 'Kundi ikki útføra: ';
-$PHPMAILER_LANG['file_access'] = 'Kundi ikki tilganga fílu: ';
-$PHPMAILER_LANG['file_open'] = 'Fílu feilur: Kundi ikki opna fílu: ';
-$PHPMAILER_LANG['from_failed'] = 'fylgjandi Frá/From adressa miseydnaðist: ';
-$PHPMAILER_LANG['instantiate'] = 'Kuni ikki instantiera mail funktión.';
-//$PHPMAILER_LANG['invalid_address'] = 'Invalid address: ';
-$PHPMAILER_LANG['mailer_not_supported'] = ' er ikki supporterað.';
-$PHPMAILER_LANG['provide_address'] = 'Tú skal uppgeva minst móttakara-emailadressu(r).';
-$PHPMAILER_LANG['recipients_failed'] = 'SMTP Feilur: Fylgjandi móttakarar miseydnaðust: ';
-//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
-//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
-//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
-//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
-//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php
deleted file mode 100644
index af68c92..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php
+++ /dev/null
@@ -1,29 +0,0 @@
-
- */
-
-$PHPMAILER_LANG['authenticate'] = 'Erro SMTP: Non puido ser autentificado.';
-$PHPMAILER_LANG['connect_host'] = 'Erro SMTP: Non puido conectar co servidor SMTP.';
-$PHPMAILER_LANG['data_not_accepted'] = 'Erro SMTP: Datos non aceptados.';
-$PHPMAILER_LANG['empty_message'] = 'Corpo da mensaxe vacía';
-$PHPMAILER_LANG['encoding'] = 'Codificación descoñecida: ';
-$PHPMAILER_LANG['execute'] = 'Non puido ser executado: ';
-$PHPMAILER_LANG['file_access'] = 'Nob puido acceder ó arquivo: ';
-$PHPMAILER_LANG['file_open'] = 'Erro de Arquivo: No puido abrir o arquivo: ';
-$PHPMAILER_LANG['from_failed'] = 'A(s) seguinte(s) dirección(s) de remitente(s) deron erro: ';
-$PHPMAILER_LANG['instantiate'] = 'Non puido crear unha instancia da función Mail.';
-$PHPMAILER_LANG['invalid_address'] = 'Non puido envia-lo correo: dirección de email inválida: ';
-$PHPMAILER_LANG['mailer_not_supported'] = ' mailer non está soportado.';
-$PHPMAILER_LANG['provide_address'] = 'Debe engadir polo menos unha dirección de email coma destino.';
-$PHPMAILER_LANG['recipients_failed'] = 'Erro SMTP: Os seguintes destinos fallaron: ';
-$PHPMAILER_LANG['signing'] = 'Erro ó firmar: ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() fallou.';
-$PHPMAILER_LANG['smtp_error'] = 'Erro do servidor SMTP: ';
-$PHPMAILER_LANG['variable_set'] = 'Non puidemos axustar ou reaxustar a variábel: ';
-//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-he.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-he.php
deleted file mode 100644
index 70eb717..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-he.php
+++ /dev/null
@@ -1,26 +0,0 @@
-
- */
-
-$PHPMAILER_LANG['authenticate'] = 'שגיאת SMTP: פעולת האימות נכשלה.';
-$PHPMAILER_LANG['connect_host'] = 'שגיאת SMTP: לא הצלחתי להתחבר לשרת SMTP.';
-$PHPMAILER_LANG['data_not_accepted'] = 'שגיאת SMTP: מידע לא התקבל.';
-$PHPMAILER_LANG['empty_message'] = 'גוף ההודעה ריק';
-$PHPMAILER_LANG['invalid_address'] = 'כתובת שגויה: ';
-$PHPMAILER_LANG['encoding'] = 'קידוד לא מוכר: ';
-$PHPMAILER_LANG['execute'] = 'לא הצלחתי להפעיל את: ';
-$PHPMAILER_LANG['file_access'] = 'לא ניתן לגשת לקובץ: ';
-$PHPMAILER_LANG['file_open'] = 'שגיאת קובץ: לא ניתן לגשת לקובץ: ';
-$PHPMAILER_LANG['from_failed'] = 'כתובות הנמענים הבאות נכשלו: ';
-$PHPMAILER_LANG['instantiate'] = 'לא הצלחתי להפעיל את פונקציית המייל.';
-$PHPMAILER_LANG['mailer_not_supported'] = ' אינה נתמכת.';
-$PHPMAILER_LANG['provide_address'] = 'חובה לספק לפחות כתובת אחת של מקבל המייל.';
-$PHPMAILER_LANG['recipients_failed'] = 'שגיאת SMTP: הנמענים הבאים נכשלו: ';
-$PHPMAILER_LANG['signing'] = 'שגיאת חתימה: ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
-$PHPMAILER_LANG['smtp_error'] = 'שגיאת שרת SMTP: ';
-$PHPMAILER_LANG['variable_set'] = 'לא ניתן לקבוע או לשנות את המשתנה: ';
-//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-hi.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-hi.php
deleted file mode 100644
index 607a5ee..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-hi.php
+++ /dev/null
@@ -1,26 +0,0 @@
-
- */
-
-$PHPMAILER_LANG['authenticate'] = 'SMTP त्रुटि: प्रामाणिकता की जांच नहीं हो सका। ';
-$PHPMAILER_LANG['connect_host'] = 'SMTP त्रुटि: SMTP सर्वर से कनेक्ट नहीं हो सका। ';
-$PHPMAILER_LANG['data_not_accepted'] = 'SMTP त्रुटि: डेटा स्वीकार नहीं किया जाता है। ';
-$PHPMAILER_LANG['empty_message'] = 'संदेश खाली है। ';
-$PHPMAILER_LANG['encoding'] = 'अज्ञात एन्कोडिंग प्रकार। ';
-$PHPMAILER_LANG['execute'] = 'आदेश को निष्पादित करने में विफल। ';
-$PHPMAILER_LANG['file_access'] = 'फ़ाइल उपलब्ध नहीं है। ';
-$PHPMAILER_LANG['file_open'] = 'फ़ाइल त्रुटि: फाइल को खोला नहीं जा सका। ';
-$PHPMAILER_LANG['from_failed'] = 'प्रेषक का पता गलत है। ';
-$PHPMAILER_LANG['instantiate'] = 'मेल फ़ंक्शन कॉल नहीं कर सकता है।';
-$PHPMAILER_LANG['invalid_address'] = 'पता गलत है। ';
-$PHPMAILER_LANG['mailer_not_supported'] = 'मेल सर्वर के साथ काम नहीं करता है। ';
-$PHPMAILER_LANG['provide_address'] = 'आपको कम से कम एक प्राप्तकर्ता का ई-मेल पता प्रदान करना होगा।';
-$PHPMAILER_LANG['recipients_failed'] = 'SMTP त्रुटि: निम्न प्राप्तकर्ताओं को पते भेजने में विफल। ';
-$PHPMAILER_LANG['signing'] = 'साइनअप त्रुटि:। ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP का connect () फ़ंक्शन विफल हुआ। ';
-$PHPMAILER_LANG['smtp_error'] = 'SMTP सर्वर त्रुटि। ';
-$PHPMAILER_LANG['variable_set'] = 'चर को बना या संशोधित नहीं किया जा सकता। ';
-$PHPMAILER_LANG['extension_missing'] = 'एक्सटेन्षन गायब है: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-hr.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-hr.php
deleted file mode 100644
index 3822920..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-hr.php
+++ /dev/null
@@ -1,26 +0,0 @@
-
- */
-
-$PHPMAILER_LANG['authenticate'] = 'SMTP Greška: Neuspjela autentikacija.';
-$PHPMAILER_LANG['connect_host'] = 'SMTP Greška: Ne mogu se spojiti na SMTP poslužitelj.';
-$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Greška: Podatci nisu prihvaćeni.';
-$PHPMAILER_LANG['empty_message'] = 'Sadržaj poruke je prazan.';
-$PHPMAILER_LANG['encoding'] = 'Nepoznati encoding: ';
-$PHPMAILER_LANG['execute'] = 'Nije moguće izvršiti naredbu: ';
-$PHPMAILER_LANG['file_access'] = 'Nije moguće pristupiti datoteci: ';
-$PHPMAILER_LANG['file_open'] = 'Nije moguće otvoriti datoteku: ';
-$PHPMAILER_LANG['from_failed'] = 'SMTP Greška: Slanje s navedenih e-mail adresa nije uspjelo: ';
-$PHPMAILER_LANG['recipients_failed'] = 'SMTP Greška: Slanje na navedenih e-mail adresa nije uspjelo: ';
-$PHPMAILER_LANG['instantiate'] = 'Ne mogu pokrenuti mail funkcionalnost.';
-$PHPMAILER_LANG['invalid_address'] = 'E-mail nije poslan. Neispravna e-mail adresa: ';
-$PHPMAILER_LANG['mailer_not_supported'] = ' mailer nije podržan.';
-$PHPMAILER_LANG['provide_address'] = 'Definirajte barem jednu adresu primatelja.';
-$PHPMAILER_LANG['signing'] = 'Greška prilikom prijave: ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'Spajanje na SMTP poslužitelj nije uspjelo.';
-$PHPMAILER_LANG['smtp_error'] = 'Greška SMTP poslužitelja: ';
-$PHPMAILER_LANG['variable_set'] = 'Ne mogu postaviti varijablu niti ju vratiti nazad: ';
-$PHPMAILER_LANG['extension_missing'] = 'Nedostaje proširenje: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-hu.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-hu.php
deleted file mode 100644
index 196cddc..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-hu.php
+++ /dev/null
@@ -1,26 +0,0 @@
-
- * @author @januridp
- */
-
-$PHPMAILER_LANG['authenticate'] = 'Kesalahan SMTP: Tidak dapat mengotentikasi.';
-$PHPMAILER_LANG['connect_host'] = 'Kesalahan SMTP: Tidak dapat terhubung ke host SMTP.';
-$PHPMAILER_LANG['data_not_accepted'] = 'Kesalahan SMTP: Data tidak diterima.';
-$PHPMAILER_LANG['empty_message'] = 'Isi pesan kosong';
-$PHPMAILER_LANG['encoding'] = 'Pengkodean karakter tidak dikenali: ';
-$PHPMAILER_LANG['execute'] = 'Tidak dapat menjalankan proses : ';
-$PHPMAILER_LANG['file_access'] = 'Tidak dapat mengakses berkas : ';
-$PHPMAILER_LANG['file_open'] = 'Kesalahan File: Berkas tidak dapat dibuka : ';
-$PHPMAILER_LANG['from_failed'] = 'Alamat pengirim berikut mengakibatkan kesalahan : ';
-$PHPMAILER_LANG['instantiate'] = 'Tidak dapat menginisialisasi fungsi surel';
-$PHPMAILER_LANG['invalid_address'] = 'Gagal terkirim, alamat surel tidak benar : ';
-$PHPMAILER_LANG['provide_address'] = 'Harus disediakan minimal satu alamat tujuan';
-$PHPMAILER_LANG['mailer_not_supported'] = ' mailer tidak didukung';
-$PHPMAILER_LANG['recipients_failed'] = 'Kesalahan SMTP: Alamat tujuan berikut menghasilkan kesalahan : ';
-$PHPMAILER_LANG['signing'] = 'Kesalahan dalam tanda tangan : ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() gagal.';
-$PHPMAILER_LANG['smtp_error'] = 'Kesalahan pada pelayan SMTP : ';
-$PHPMAILER_LANG['variable_set'] = 'Tidak dapat mengatur atau mengatur ulang variable : ';
-$PHPMAILER_LANG['extension_missing'] = 'Ekstensi hilang: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-it.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-it.php
deleted file mode 100644
index e67b6f7..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-it.php
+++ /dev/null
@@ -1,27 +0,0 @@
-
- * @author Stefano Sabatini
- */
-
-$PHPMAILER_LANG['authenticate'] = 'SMTP Error: Impossibile autenticarsi.';
-$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Impossibile connettersi all\'host SMTP.';
-$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Dati non accettati dal server.';
-$PHPMAILER_LANG['empty_message'] = 'Il corpo del messaggio è vuoto';
-$PHPMAILER_LANG['encoding'] = 'Codifica dei caratteri sconosciuta: ';
-$PHPMAILER_LANG['execute'] = 'Impossibile eseguire l\'operazione: ';
-$PHPMAILER_LANG['file_access'] = 'Impossibile accedere al file: ';
-$PHPMAILER_LANG['file_open'] = 'File Error: Impossibile aprire il file: ';
-$PHPMAILER_LANG['from_failed'] = 'I seguenti indirizzi mittenti hanno generato errore: ';
-$PHPMAILER_LANG['instantiate'] = 'Impossibile istanziare la funzione mail';
-$PHPMAILER_LANG['invalid_address'] = 'Impossibile inviare, l\'indirizzo email non è valido: ';
-$PHPMAILER_LANG['provide_address'] = 'Deve essere fornito almeno un indirizzo ricevente';
-$PHPMAILER_LANG['mailer_not_supported'] = 'Mailer non supportato';
-$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: I seguenti indirizzi destinatari hanno generato un errore: ';
-$PHPMAILER_LANG['signing'] = 'Errore nella firma: ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() fallita.';
-$PHPMAILER_LANG['smtp_error'] = 'Errore del server SMTP: ';
-$PHPMAILER_LANG['variable_set'] = 'Impossibile impostare o resettare la variabile: ';
-$PHPMAILER_LANG['extension_missing'] = 'Estensione mancante: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php
deleted file mode 100644
index 2d77872..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php
+++ /dev/null
@@ -1,27 +0,0 @@
-
- * @author Yoshi Sakai
- */
-
-$PHPMAILER_LANG['authenticate'] = 'SMTPエラー: 認証できませんでした。';
-$PHPMAILER_LANG['connect_host'] = 'SMTPエラー: SMTPホストに接続できませんでした。';
-$PHPMAILER_LANG['data_not_accepted'] = 'SMTPエラー: データが受け付けられませんでした。';
-//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
-$PHPMAILER_LANG['encoding'] = '不明なエンコーディング: ';
-$PHPMAILER_LANG['execute'] = '実行できませんでした: ';
-$PHPMAILER_LANG['file_access'] = 'ファイルにアクセスできません: ';
-$PHPMAILER_LANG['file_open'] = 'ファイルエラー: ファイルを開けません: ';
-$PHPMAILER_LANG['from_failed'] = 'Fromアドレスを登録する際にエラーが発生しました: ';
-$PHPMAILER_LANG['instantiate'] = 'メール関数が正常に動作しませんでした。';
-//$PHPMAILER_LANG['invalid_address'] = 'Invalid address: ';
-$PHPMAILER_LANG['provide_address'] = '少なくとも1つメールアドレスを 指定する必要があります。';
-$PHPMAILER_LANG['mailer_not_supported'] = ' メーラーがサポートされていません。';
-$PHPMAILER_LANG['recipients_failed'] = 'SMTPエラー: 次の受信者アドレスに 間違いがあります: ';
-//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
-//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
-//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
-//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: ';
-//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ka.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ka.php
deleted file mode 100644
index dd1af8a..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ka.php
+++ /dev/null
@@ -1,26 +0,0 @@
-
- */
-
-$PHPMAILER_LANG['authenticate'] = 'SMTP შეცდომა: ავტორიზაცია შეუძლებელია.';
-$PHPMAILER_LANG['connect_host'] = 'SMTP შეცდომა: SMTP სერვერთან დაკავშირება შეუძლებელია.';
-$PHPMAILER_LANG['data_not_accepted'] = 'SMTP შეცდომა: მონაცემები არ იქნა მიღებული.';
-$PHPMAILER_LANG['encoding'] = 'კოდირების უცნობი ტიპი: ';
-$PHPMAILER_LANG['execute'] = 'შეუძლებელია შემდეგი ბრძანების შესრულება: ';
-$PHPMAILER_LANG['file_access'] = 'შეუძლებელია წვდომა ფაილთან: ';
-$PHPMAILER_LANG['file_open'] = 'ფაილური სისტემის შეცდომა: არ იხსნება ფაილი: ';
-$PHPMAILER_LANG['from_failed'] = 'გამგზავნის არასწორი მისამართი: ';
-$PHPMAILER_LANG['instantiate'] = 'mail ფუნქციის გაშვება ვერ ხერხდება.';
-$PHPMAILER_LANG['provide_address'] = 'გთხოვთ მიუთითოთ ერთი ადრესატის e-mail მისამართი მაინც.';
-$PHPMAILER_LANG['mailer_not_supported'] = ' - საფოსტო სერვერის მხარდაჭერა არ არის.';
-$PHPMAILER_LANG['recipients_failed'] = 'SMTP შეცდომა: შემდეგ მისამართებზე გაგზავნა ვერ მოხერხდა: ';
-$PHPMAILER_LANG['empty_message'] = 'შეტყობინება ცარიელია';
-$PHPMAILER_LANG['invalid_address'] = 'არ გაიგზავნა, e-mail მისამართის არასწორი ფორმატი: ';
-$PHPMAILER_LANG['signing'] = 'ხელმოწერის შეცდომა: ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'შეცდომა SMTP სერვერთან დაკავშირებისას';
-$PHPMAILER_LANG['smtp_error'] = 'SMTP სერვერის შეცდომა: ';
-$PHPMAILER_LANG['variable_set'] = 'შეუძლებელია შემდეგი ცვლადის შექმნა ან შეცვლა: ';
-$PHPMAILER_LANG['extension_missing'] = 'ბიბლიოთეკა არ არსებობს: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ko.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ko.php
deleted file mode 100644
index 9599fa6..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ko.php
+++ /dev/null
@@ -1,26 +0,0 @@
-
- */
-
-$PHPMAILER_LANG['authenticate'] = 'SMTP 오류: 인증할 수 없습니다.';
-$PHPMAILER_LANG['connect_host'] = 'SMTP 오류: SMTP 호스트에 접속할 수 없습니다.';
-$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 오류: 데이터가 받아들여지지 않았습니다.';
-$PHPMAILER_LANG['empty_message'] = '메세지 내용이 없습니다';
-$PHPMAILER_LANG['encoding'] = '알 수 없는 인코딩: ';
-$PHPMAILER_LANG['execute'] = '실행 불가: ';
-$PHPMAILER_LANG['file_access'] = '파일 접근 불가: ';
-$PHPMAILER_LANG['file_open'] = '파일 오류: 파일을 열 수 없습니다: ';
-$PHPMAILER_LANG['from_failed'] = '다음 From 주소에서 오류가 발생했습니다: ';
-$PHPMAILER_LANG['instantiate'] = 'mail 함수를 인스턴스화할 수 없습니다';
-$PHPMAILER_LANG['invalid_address'] = '잘못된 주소: ';
-$PHPMAILER_LANG['mailer_not_supported'] = ' 메일러는 지원되지 않습니다.';
-$PHPMAILER_LANG['provide_address'] = '적어도 한 개 이상의 수신자 메일 주소를 제공해야 합니다.';
-$PHPMAILER_LANG['recipients_failed'] = 'SMTP 오류: 다음 수신자에서 오류가 발생했습니다: ';
-$PHPMAILER_LANG['signing'] = '서명 오류: ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP 연결을 실패하였습니다.';
-$PHPMAILER_LANG['smtp_error'] = 'SMTP 서버 오류: ';
-$PHPMAILER_LANG['variable_set'] = '변수 설정 및 초기화 불가: ';
-$PHPMAILER_LANG['extension_missing'] = '확장자 없음: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-lt.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-lt.php
deleted file mode 100644
index 1253a4f..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-lt.php
+++ /dev/null
@@ -1,26 +0,0 @@
-
- */
-
-$PHPMAILER_LANG['authenticate'] = 'SMTP klaida: autentifikacija nepavyko.';
-$PHPMAILER_LANG['connect_host'] = 'SMTP klaida: nepavyksta prisijungti prie SMTP stoties.';
-$PHPMAILER_LANG['data_not_accepted'] = 'SMTP klaida: duomenys nepriimti.';
-$PHPMAILER_LANG['empty_message'] = 'Laiško turinys tuščias';
-$PHPMAILER_LANG['encoding'] = 'Neatpažinta koduotė: ';
-$PHPMAILER_LANG['execute'] = 'Nepavyko įvykdyti komandos: ';
-$PHPMAILER_LANG['file_access'] = 'Byla nepasiekiama: ';
-$PHPMAILER_LANG['file_open'] = 'Bylos klaida: Nepavyksta atidaryti: ';
-$PHPMAILER_LANG['from_failed'] = 'Neteisingas siuntėjo adresas: ';
-$PHPMAILER_LANG['instantiate'] = 'Nepavyko paleisti mail funkcijos.';
-$PHPMAILER_LANG['invalid_address'] = 'Neteisingas adresas: ';
-$PHPMAILER_LANG['mailer_not_supported'] = ' pašto stotis nepalaikoma.';
-$PHPMAILER_LANG['provide_address'] = 'Nurodykite bent vieną gavėjo adresą.';
-$PHPMAILER_LANG['recipients_failed'] = 'SMTP klaida: nepavyko išsiųsti šiems gavėjams: ';
-$PHPMAILER_LANG['signing'] = 'Prisijungimo klaida: ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP susijungimo klaida';
-$PHPMAILER_LANG['smtp_error'] = 'SMTP stoties klaida: ';
-$PHPMAILER_LANG['variable_set'] = 'Nepavyko priskirti reikšmės kintamajam: ';
-//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-lv.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-lv.php
deleted file mode 100644
index 39bf9a1..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-lv.php
+++ /dev/null
@@ -1,26 +0,0 @@
-
- */
-
-$PHPMAILER_LANG['authenticate'] = 'SMTP kļūda: Autorizācija neizdevās.';
-$PHPMAILER_LANG['connect_host'] = 'SMTP Kļūda: Nevar izveidot savienojumu ar SMTP serveri.';
-$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Kļūda: Nepieņem informāciju.';
-$PHPMAILER_LANG['empty_message'] = 'Ziņojuma teksts ir tukšs';
-$PHPMAILER_LANG['encoding'] = 'Neatpazīts kodējums: ';
-$PHPMAILER_LANG['execute'] = 'Neizdevās izpildīt komandu: ';
-$PHPMAILER_LANG['file_access'] = 'Fails nav pieejams: ';
-$PHPMAILER_LANG['file_open'] = 'Faila kļūda: Nevar atvērt failu: ';
-$PHPMAILER_LANG['from_failed'] = 'Nepareiza sūtītāja adrese: ';
-$PHPMAILER_LANG['instantiate'] = 'Nevar palaist sūtīšanas funkciju.';
-$PHPMAILER_LANG['invalid_address'] = 'Nepareiza adrese: ';
-$PHPMAILER_LANG['mailer_not_supported'] = ' sūtītājs netiek atbalstīts.';
-$PHPMAILER_LANG['provide_address'] = 'Lūdzu, norādiet vismaz vienu adresātu.';
-$PHPMAILER_LANG['recipients_failed'] = 'SMTP kļūda: neizdevās nosūtīt šādiem saņēmējiem: ';
-$PHPMAILER_LANG['signing'] = 'Autorizācijas kļūda: ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP savienojuma kļūda';
-$PHPMAILER_LANG['smtp_error'] = 'SMTP servera kļūda: ';
-$PHPMAILER_LANG['variable_set'] = 'Nevar piešķirt mainīgā vērtību: ';
-//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-mg.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-mg.php
deleted file mode 100644
index f4c7563..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-mg.php
+++ /dev/null
@@ -1,25 +0,0 @@
-
- */
-$PHPMAILER_LANG['authenticate'] = 'Hadisoana SMTP: Tsy nahomby ny fanamarinana.';
-$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Tsy afaka mampifandray amin\'ny mpampiantrano SMTP.';
-$PHPMAILER_LANG['data_not_accepted'] = 'SMTP diso: tsy voarakitra ny angona.';
-$PHPMAILER_LANG['empty_message'] = 'Tsy misy ny votoaty mailaka.';
-$PHPMAILER_LANG['encoding'] = 'Tsy fantatra encoding: ';
-$PHPMAILER_LANG['execute'] = 'Tsy afaka manatanteraka ity baiko manaraka ity: ';
-$PHPMAILER_LANG['file_access'] = 'Tsy nahomby ny fidirana amin\'ity rakitra ity: ';
-$PHPMAILER_LANG['file_open'] = 'Hadisoana diso: Tsy afaka nanokatra ity file manaraka ity: ';
-$PHPMAILER_LANG['from_failed'] = 'Ny adiresy iraka manaraka dia diso: ';
-$PHPMAILER_LANG['instantiate'] = 'Tsy afaka nanomboka ny hetsika mail.';
-$PHPMAILER_LANG['invalid_address'] = 'Tsy mety ny adiresy: ';
-$PHPMAILER_LANG['mailer_not_supported'] = ' mailer tsy manohana.';
-$PHPMAILER_LANG['provide_address'] = 'Alefaso azafady iray adiresy iray farafahakeliny.';
-$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: Tsy mety ireo mpanaraka ireto: ';
-$PHPMAILER_LANG['signing'] = 'Error nandritra ny sonia:';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'Tsy nahomby ny fifandraisana tamin\'ny server SMTP.';
-$PHPMAILER_LANG['smtp_error'] = 'Fahadisoana tamin\'ny server SMTP: ';
-$PHPMAILER_LANG['variable_set'] = 'Tsy azo atao ny mametraka na mamerina ny variable: ';
-$PHPMAILER_LANG['extension_missing'] = 'Tsy hita ny ampahany: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ms.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ms.php
deleted file mode 100644
index f12a6ad..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ms.php
+++ /dev/null
@@ -1,26 +0,0 @@
-
- */
-
-$PHPMAILER_LANG['authenticate'] = 'Ralat SMTP: Tidak dapat pengesahan.';
-$PHPMAILER_LANG['connect_host'] = 'Ralat SMTP: Tidak dapat menghubungi hos pelayan SMTP.';
-$PHPMAILER_LANG['data_not_accepted'] = 'Ralat SMTP: Data tidak diterima oleh pelayan.';
-$PHPMAILER_LANG['empty_message'] = 'Tiada isi untuk mesej';
-$PHPMAILER_LANG['encoding'] = 'Pengekodan tidak diketahui: ';
-$PHPMAILER_LANG['execute'] = 'Tidak dapat melaksanakan: ';
-$PHPMAILER_LANG['file_access'] = 'Tidak dapat mengakses fail: ';
-$PHPMAILER_LANG['file_open'] = 'Ralat Fail: Tidak dapat membuka fail: ';
-$PHPMAILER_LANG['from_failed'] = 'Berikut merupakan ralat dari alamat e-mel: ';
-$PHPMAILER_LANG['instantiate'] = 'Tidak dapat memberi contoh fungsi e-mel.';
-$PHPMAILER_LANG['invalid_address'] = 'Alamat emel tidak sah: ';
-$PHPMAILER_LANG['mailer_not_supported'] = ' jenis penghantar emel tidak disokong.';
-$PHPMAILER_LANG['provide_address'] = 'Anda perlu menyediakan sekurang-kurangnya satu alamat e-mel penerima.';
-$PHPMAILER_LANG['recipients_failed'] = 'Ralat SMTP: Penerima e-mel berikut telah gagal: ';
-$PHPMAILER_LANG['signing'] = 'Ralat pada tanda tangan: ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() telah gagal.';
-$PHPMAILER_LANG['smtp_error'] = 'Ralat pada pelayan SMTP: ';
-$PHPMAILER_LANG['variable_set'] = 'Tidak boleh menetapkan atau menetapkan semula pembolehubah: ';
-$PHPMAILER_LANG['extension_missing'] = 'Sambungan hilang: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-nb.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-nb.php
deleted file mode 100644
index 97403e7..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-nb.php
+++ /dev/null
@@ -1,25 +0,0 @@
-
- */
-
-$PHPMAILER_LANG['authenticate'] = 'SMTP-fout: authenticatie mislukt.';
-$PHPMAILER_LANG['connect_host'] = 'SMTP-fout: kon niet verbinden met SMTP-host.';
-$PHPMAILER_LANG['data_not_accepted'] = 'SMTP-fout: data niet geaccepteerd.';
-$PHPMAILER_LANG['empty_message'] = 'Berichttekst is leeg';
-$PHPMAILER_LANG['encoding'] = 'Onbekende codering: ';
-$PHPMAILER_LANG['execute'] = 'Kon niet uitvoeren: ';
-$PHPMAILER_LANG['file_access'] = 'Kreeg geen toegang tot bestand: ';
-$PHPMAILER_LANG['file_open'] = 'Bestandsfout: kon bestand niet openen: ';
-$PHPMAILER_LANG['from_failed'] = 'Het volgende afzendersadres is mislukt: ';
-$PHPMAILER_LANG['instantiate'] = 'Kon mailfunctie niet initialiseren.';
-$PHPMAILER_LANG['invalid_address'] = 'Ongeldig adres: ';
-$PHPMAILER_LANG['mailer_not_supported'] = ' mailer wordt niet ondersteund.';
-$PHPMAILER_LANG['provide_address'] = 'Er moet minstens één ontvanger worden opgegeven.';
-$PHPMAILER_LANG['recipients_failed'] = 'SMTP-fout: de volgende ontvangers zijn mislukt: ';
-$PHPMAILER_LANG['signing'] = 'Signeerfout: ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Verbinding mislukt.';
-$PHPMAILER_LANG['smtp_error'] = 'SMTP-serverfout: ';
-$PHPMAILER_LANG['variable_set'] = 'Kan de volgende variabele niet instellen of resetten: ';
-$PHPMAILER_LANG['extension_missing'] = 'Extensie afwezig: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-pl.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-pl.php
deleted file mode 100644
index 3da0dee..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-pl.php
+++ /dev/null
@@ -1,26 +0,0 @@
-
- */
-
-$PHPMAILER_LANG['authenticate'] = 'Erro do SMTP: Não foi possível realizar a autenticação.';
-$PHPMAILER_LANG['connect_host'] = 'Erro do SMTP: Não foi possível realizar ligação com o servidor SMTP.';
-$PHPMAILER_LANG['data_not_accepted'] = 'Erro do SMTP: Os dados foram rejeitados.';
-$PHPMAILER_LANG['empty_message'] = 'A mensagem no e-mail está vazia.';
-$PHPMAILER_LANG['encoding'] = 'Codificação desconhecida: ';
-$PHPMAILER_LANG['execute'] = 'Não foi possível executar: ';
-$PHPMAILER_LANG['file_access'] = 'Não foi possível aceder o ficheiro: ';
-$PHPMAILER_LANG['file_open'] = 'Abertura do ficheiro: Não foi possível abrir o ficheiro: ';
-$PHPMAILER_LANG['from_failed'] = 'Ocorreram falhas nos endereços dos seguintes remententes: ';
-$PHPMAILER_LANG['instantiate'] = 'Não foi possível iniciar uma instância da função mail.';
-$PHPMAILER_LANG['invalid_address'] = 'Não foi enviado nenhum e-mail para o endereço de e-mail inválido: ';
-$PHPMAILER_LANG['mailer_not_supported'] = ' mailer não é suportado.';
-$PHPMAILER_LANG['provide_address'] = 'Tem de fornecer pelo menos um endereço como destinatário do e-mail.';
-$PHPMAILER_LANG['recipients_failed'] = 'Erro do SMTP: O endereço do seguinte destinatário falhou: ';
-$PHPMAILER_LANG['signing'] = 'Erro ao assinar: ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falhou.';
-$PHPMAILER_LANG['smtp_error'] = 'Erro de servidor SMTP: ';
-$PHPMAILER_LANG['variable_set'] = 'Não foi possível definir ou redefinir a variável: ';
-$PHPMAILER_LANG['extension_missing'] = 'Extensão em falta: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-pt_br.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-pt_br.php
deleted file mode 100644
index 62d692d..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-pt_br.php
+++ /dev/null
@@ -1,29 +0,0 @@
-
- * @author Lucas Guimarães
- * @author Phelipe Alves
- * @author Fabio Beneditto
- */
-
-$PHPMAILER_LANG['authenticate'] = 'Erro de SMTP: Não foi possível autenticar.';
-$PHPMAILER_LANG['connect_host'] = 'Erro de SMTP: Não foi possível conectar ao servidor SMTP.';
-$PHPMAILER_LANG['data_not_accepted'] = 'Erro de SMTP: Dados rejeitados.';
-$PHPMAILER_LANG['empty_message'] = 'Mensagem vazia';
-$PHPMAILER_LANG['encoding'] = 'Codificação desconhecida: ';
-$PHPMAILER_LANG['execute'] = 'Não foi possível executar: ';
-$PHPMAILER_LANG['file_access'] = 'Não foi possível acessar o arquivo: ';
-$PHPMAILER_LANG['file_open'] = 'Erro de Arquivo: Não foi possível abrir o arquivo: ';
-$PHPMAILER_LANG['from_failed'] = 'Os seguintes remetentes falharam: ';
-$PHPMAILER_LANG['instantiate'] = 'Não foi possível instanciar a função mail.';
-$PHPMAILER_LANG['invalid_address'] = 'Endereço de e-mail inválido: ';
-$PHPMAILER_LANG['mailer_not_supported'] = ' mailer não é suportado.';
-$PHPMAILER_LANG['provide_address'] = 'Você deve informar pelo menos um destinatário.';
-$PHPMAILER_LANG['recipients_failed'] = 'Erro de SMTP: Os seguintes destinatários falharam: ';
-$PHPMAILER_LANG['signing'] = 'Erro de Assinatura: ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falhou.';
-$PHPMAILER_LANG['smtp_error'] = 'Erro de servidor SMTP: ';
-$PHPMAILER_LANG['variable_set'] = 'Não foi possível definir ou redefinir a variável: ';
-$PHPMAILER_LANG['extension_missing'] = 'Extensão não existe: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ro.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ro.php
deleted file mode 100644
index fa100ea..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ro.php
+++ /dev/null
@@ -1,26 +0,0 @@
-
- */
-
-$PHPMAILER_LANG['authenticate'] = 'Eroare SMTP: Autentificarea a eșuat.';
-$PHPMAILER_LANG['connect_host'] = 'Eroare SMTP: Conectarea la serverul SMTP a eșuat.';
-$PHPMAILER_LANG['data_not_accepted'] = 'Eroare SMTP: Datele nu au fost acceptate.';
-$PHPMAILER_LANG['empty_message'] = 'Mesajul este gol.';
-$PHPMAILER_LANG['encoding'] = 'Encodare necunoscută: ';
-$PHPMAILER_LANG['execute'] = 'Nu se poate executa următoarea comandă: ';
-$PHPMAILER_LANG['file_access'] = 'Nu se poate accesa următorul fișier: ';
-$PHPMAILER_LANG['file_open'] = 'Eroare fișier: Nu se poate deschide următorul fișier: ';
-$PHPMAILER_LANG['from_failed'] = 'Următoarele adrese From au dat eroare: ';
-$PHPMAILER_LANG['instantiate'] = 'Funcția mail nu a putut fi inițializată.';
-$PHPMAILER_LANG['invalid_address'] = 'Adresa de email nu este validă: ';
-$PHPMAILER_LANG['mailer_not_supported'] = ' mailer nu este suportat.';
-$PHPMAILER_LANG['provide_address'] = 'Trebuie să adăugați cel puțin o adresă de email.';
-$PHPMAILER_LANG['recipients_failed'] = 'Eroare SMTP: Următoarele adrese de email au eșuat: ';
-$PHPMAILER_LANG['signing'] = 'A aparut o problemă la semnarea emailului. ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'Conectarea la serverul SMTP a eșuat.';
-$PHPMAILER_LANG['smtp_error'] = 'Eroare server SMTP: ';
-$PHPMAILER_LANG['variable_set'] = 'Nu se poate seta/reseta variabila. ';
-$PHPMAILER_LANG['extension_missing'] = 'Lipsește extensia: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ru.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ru.php
deleted file mode 100644
index 720e9a1..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ru.php
+++ /dev/null
@@ -1,27 +0,0 @@
-
- * @author Foster Snowhill
- */
-
-$PHPMAILER_LANG['authenticate'] = 'Ошибка SMTP: ошибка авторизации.';
-$PHPMAILER_LANG['connect_host'] = 'Ошибка SMTP: не удается подключиться к SMTP-серверу.';
-$PHPMAILER_LANG['data_not_accepted'] = 'Ошибка SMTP: данные не приняты.';
-$PHPMAILER_LANG['encoding'] = 'Неизвестная кодировка: ';
-$PHPMAILER_LANG['execute'] = 'Невозможно выполнить команду: ';
-$PHPMAILER_LANG['file_access'] = 'Нет доступа к файлу: ';
-$PHPMAILER_LANG['file_open'] = 'Файловая ошибка: не удаётся открыть файл: ';
-$PHPMAILER_LANG['from_failed'] = 'Неверный адрес отправителя: ';
-$PHPMAILER_LANG['instantiate'] = 'Невозможно запустить функцию mail().';
-$PHPMAILER_LANG['provide_address'] = 'Пожалуйста, введите хотя бы один email-адрес получателя.';
-$PHPMAILER_LANG['mailer_not_supported'] = ' — почтовый сервер не поддерживается.';
-$PHPMAILER_LANG['recipients_failed'] = 'Ошибка SMTP: не удалась отправка таким адресатам: ';
-$PHPMAILER_LANG['empty_message'] = 'Пустое сообщение';
-$PHPMAILER_LANG['invalid_address'] = 'Не отправлено из-за неправильного формата email-адреса: ';
-$PHPMAILER_LANG['signing'] = 'Ошибка подписи: ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'Ошибка соединения с SMTP-сервером';
-$PHPMAILER_LANG['smtp_error'] = 'Ошибка SMTP-сервера: ';
-$PHPMAILER_LANG['variable_set'] = 'Невозможно установить или сбросить переменную: ';
-$PHPMAILER_LANG['extension_missing'] = 'Расширение отсутствует: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-sk.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-sk.php
deleted file mode 100644
index 69cfb0f..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-sk.php
+++ /dev/null
@@ -1,27 +0,0 @@
-
- * @author Peter Orlický
- */
-
-$PHPMAILER_LANG['authenticate'] = 'SMTP Error: Chyba autentifikácie.';
-$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Nebolo možné nadviazať spojenie so SMTP serverom.';
-$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Dáta neboli prijaté';
-$PHPMAILER_LANG['empty_message'] = 'Prázdne telo správy.';
-$PHPMAILER_LANG['encoding'] = 'Neznáme kódovanie: ';
-$PHPMAILER_LANG['execute'] = 'Nedá sa vykonať: ';
-$PHPMAILER_LANG['file_access'] = 'Súbor nebol nájdený: ';
-$PHPMAILER_LANG['file_open'] = 'File Error: Súbor sa otvoriť pre čítanie: ';
-$PHPMAILER_LANG['from_failed'] = 'Následujúca adresa From je nesprávna: ';
-$PHPMAILER_LANG['instantiate'] = 'Nedá sa vytvoriť inštancia emailovej funkcie.';
-$PHPMAILER_LANG['invalid_address'] = 'Neodoslané, emailová adresa je nesprávna: ';
-$PHPMAILER_LANG['mailer_not_supported'] = ' emailový klient nieje podporovaný.';
-$PHPMAILER_LANG['provide_address'] = 'Musíte zadať aspoň jednu emailovú adresu príjemcu.';
-$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: Adresy príjemcov niesu správne ';
-$PHPMAILER_LANG['signing'] = 'Chyba prihlasovania: ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() zlyhalo.';
-$PHPMAILER_LANG['smtp_error'] = 'SMTP chyba serveru: ';
-$PHPMAILER_LANG['variable_set'] = 'Nemožno nastaviť alebo resetovať premennú: ';
-$PHPMAILER_LANG['extension_missing'] = 'Chýba rozšírenie: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-sl.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-sl.php
deleted file mode 100644
index 1e3cb7f..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-sl.php
+++ /dev/null
@@ -1,27 +0,0 @@
-
- * @author Filip Š
- */
-
-$PHPMAILER_LANG['authenticate'] = 'SMTP napaka: Avtentikacija ni uspela.';
-$PHPMAILER_LANG['connect_host'] = 'SMTP napaka: Vzpostavljanje povezave s SMTP gostiteljem ni uspelo.';
-$PHPMAILER_LANG['data_not_accepted'] = 'SMTP napaka: Strežnik zavrača podatke.';
-$PHPMAILER_LANG['empty_message'] = 'E-poštno sporočilo nima vsebine.';
-$PHPMAILER_LANG['encoding'] = 'Nepoznan tip kodiranja: ';
-$PHPMAILER_LANG['execute'] = 'Operacija ni uspela: ';
-$PHPMAILER_LANG['file_access'] = 'Nimam dostopa do datoteke: ';
-$PHPMAILER_LANG['file_open'] = 'Ne morem odpreti datoteke: ';
-$PHPMAILER_LANG['from_failed'] = 'Neveljaven e-naslov pošiljatelja: ';
-$PHPMAILER_LANG['instantiate'] = 'Ne morem inicializirati mail funkcije.';
-$PHPMAILER_LANG['invalid_address'] = 'E-poštno sporočilo ni bilo poslano. E-naslov je neveljaven: ';
-$PHPMAILER_LANG['mailer_not_supported'] = ' mailer ni podprt.';
-$PHPMAILER_LANG['provide_address'] = 'Prosim vnesite vsaj enega naslovnika.';
-$PHPMAILER_LANG['recipients_failed'] = 'SMTP napaka: Sledeči naslovniki so neveljavni: ';
-$PHPMAILER_LANG['signing'] = 'Napaka pri podpisovanju: ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'Ne morem vzpostaviti povezave s SMTP strežnikom.';
-$PHPMAILER_LANG['smtp_error'] = 'Napaka SMTP strežnika: ';
-$PHPMAILER_LANG['variable_set'] = 'Ne morem nastaviti oz. ponastaviti spremenljivke: ';
-$PHPMAILER_LANG['extension_missing'] = 'Manjkajoča razširitev: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-sr.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-sr.php
deleted file mode 100644
index 34c1e18..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-sr.php
+++ /dev/null
@@ -1,27 +0,0 @@
-
- * @author Miloš Milanović
- */
-
-$PHPMAILER_LANG['authenticate'] = 'SMTP грешка: аутентификација није успела.';
-$PHPMAILER_LANG['connect_host'] = 'SMTP грешка: повезивање са SMTP сервером није успело.';
-$PHPMAILER_LANG['data_not_accepted'] = 'SMTP грешка: подаци нису прихваћени.';
-$PHPMAILER_LANG['empty_message'] = 'Садржај поруке је празан.';
-$PHPMAILER_LANG['encoding'] = 'Непознато кодирање: ';
-$PHPMAILER_LANG['execute'] = 'Није могуће извршити наредбу: ';
-$PHPMAILER_LANG['file_access'] = 'Није могуће приступити датотеци: ';
-$PHPMAILER_LANG['file_open'] = 'Није могуће отворити датотеку: ';
-$PHPMAILER_LANG['from_failed'] = 'SMTP грешка: слање са следећих адреса није успело: ';
-$PHPMAILER_LANG['recipients_failed'] = 'SMTP грешка: слање на следеће адресе није успело: ';
-$PHPMAILER_LANG['instantiate'] = 'Није могуће покренути mail функцију.';
-$PHPMAILER_LANG['invalid_address'] = 'Порука није послата. Неисправна адреса: ';
-$PHPMAILER_LANG['mailer_not_supported'] = ' мејлер није подржан.';
-$PHPMAILER_LANG['provide_address'] = 'Дефинишите бар једну адресу примаоца.';
-$PHPMAILER_LANG['signing'] = 'Грешка приликом пријаве: ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'Повезивање са SMTP сервером није успело.';
-$PHPMAILER_LANG['smtp_error'] = 'Грешка SMTP сервера: ';
-$PHPMAILER_LANG['variable_set'] = 'Није могуће задати нити ресетовати променљиву: ';
-$PHPMAILER_LANG['extension_missing'] = 'Недостаје проширење: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-sv.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-sv.php
deleted file mode 100644
index 4408e63..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-sv.php
+++ /dev/null
@@ -1,26 +0,0 @@
-
- */
-
-$PHPMAILER_LANG['authenticate'] = 'SMTP fel: Kunde inte autentisera.';
-$PHPMAILER_LANG['connect_host'] = 'SMTP fel: Kunde inte ansluta till SMTP-server.';
-$PHPMAILER_LANG['data_not_accepted'] = 'SMTP fel: Data accepterades inte.';
-//$PHPMAILER_LANG['empty_message'] = 'Message body empty';
-$PHPMAILER_LANG['encoding'] = 'Okänt encode-format: ';
-$PHPMAILER_LANG['execute'] = 'Kunde inte köra: ';
-$PHPMAILER_LANG['file_access'] = 'Ingen åtkomst till fil: ';
-$PHPMAILER_LANG['file_open'] = 'Fil fel: Kunde inte öppna fil: ';
-$PHPMAILER_LANG['from_failed'] = 'Följande avsändaradress är felaktig: ';
-$PHPMAILER_LANG['instantiate'] = 'Kunde inte initiera e-postfunktion.';
-$PHPMAILER_LANG['invalid_address'] = 'Felaktig adress: ';
-$PHPMAILER_LANG['provide_address'] = 'Du måste ange minst en mottagares e-postadress.';
-$PHPMAILER_LANG['mailer_not_supported'] = ' mailer stöds inte.';
-$PHPMAILER_LANG['recipients_failed'] = 'SMTP fel: Följande mottagare är felaktig: ';
-$PHPMAILER_LANG['signing'] = 'Signerings fel: ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() misslyckades.';
-$PHPMAILER_LANG['smtp_error'] = 'SMTP server fel: ';
-$PHPMAILER_LANG['variable_set'] = 'Kunde inte definiera eller återställa variabel: ';
-$PHPMAILER_LANG['extension_missing'] = 'Tillägg ej tillgängligt: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-tl.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-tl.php
deleted file mode 100644
index ed51d4c..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-tl.php
+++ /dev/null
@@ -1,27 +0,0 @@
-
- */
-
-$PHPMAILER_LANG['authenticate'] = 'SMTP Error: Hindi mapatotohanan.';
-$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Hindi makakonekta sa SMTP host.';
-$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Ang datos ay hindi maaaring matatanggap.';
-$PHPMAILER_LANG['empty_message'] = 'Walang laman ang mensahe';
-$PHPMAILER_LANG['encoding'] = 'Hindi alam ang encoding: ';
-$PHPMAILER_LANG['execute'] = 'Hindi maisasagawa: ';
-$PHPMAILER_LANG['file_access'] = 'Hindi ma-access ang file: ';
-$PHPMAILER_LANG['file_open'] = 'Hindi mabuksan ang file: ';
-$PHPMAILER_LANG['from_failed'] = 'Ang sumusunod na address ay nabigo: ';
-$PHPMAILER_LANG['instantiate'] = 'Hindi maaaring magbigay ng institusyon ang mail';
-$PHPMAILER_LANG['invalid_address'] = 'Hindi wasto ang address na naibigay: ';
-$PHPMAILER_LANG['mailer_not_supported'] = 'Ang mailer ay hindi suportado';
-$PHPMAILER_LANG['provide_address'] = 'Kailangan mong magbigay ng kahit isang email address na tatanggap';
-$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: Ang mga sumusunod na tatanggap ay nabigo: ';
-$PHPMAILER_LANG['signing'] = 'Hindi ma-sign';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'Ang SMTP connect() ay nabigo';
-$PHPMAILER_LANG['smtp_error'] = 'Ang server ng SMTP ay nabigo';
-$PHPMAILER_LANG['variable_set'] = 'Hindi matatakda ang mga variables: ';
-$PHPMAILER_LANG['extension_missing'] = 'Nawawala ang extension';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-tr.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-tr.php
deleted file mode 100644
index cfe8eaa..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-tr.php
+++ /dev/null
@@ -1,30 +0,0 @@
-
- * @fixed by Boris Yurchenko
- */
-
-$PHPMAILER_LANG['authenticate'] = 'Помилка SMTP: помилка авторизації.';
-$PHPMAILER_LANG['connect_host'] = 'Помилка SMTP: не вдається під\'єднатися до SMTP-серверу.';
-$PHPMAILER_LANG['data_not_accepted'] = 'Помилка SMTP: дані не прийнято.';
-$PHPMAILER_LANG['encoding'] = 'Невідоме кодування: ';
-$PHPMAILER_LANG['execute'] = 'Неможливо виконати команду: ';
-$PHPMAILER_LANG['file_access'] = 'Немає доступу до файлу: ';
-$PHPMAILER_LANG['file_open'] = 'Помилка файлової системи: не вдається відкрити файл: ';
-$PHPMAILER_LANG['from_failed'] = 'Невірна адреса відправника: ';
-$PHPMAILER_LANG['instantiate'] = 'Неможливо запустити функцію mail().';
-$PHPMAILER_LANG['provide_address'] = 'Будь-ласка, введіть хоча б одну email-адресу отримувача.';
-$PHPMAILER_LANG['mailer_not_supported'] = ' - поштовий сервер не підтримується.';
-$PHPMAILER_LANG['recipients_failed'] = 'Помилка SMTP: не вдалося відправлення для таких отримувачів: ';
-$PHPMAILER_LANG['empty_message'] = 'Пусте повідомлення';
-$PHPMAILER_LANG['invalid_address'] = 'Не відправлено через невірний формат email-адреси: ';
-$PHPMAILER_LANG['signing'] = 'Помилка підпису: ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'Помилка з\'єднання з SMTP-сервером';
-$PHPMAILER_LANG['smtp_error'] = 'Помилка SMTP-сервера: ';
-$PHPMAILER_LANG['variable_set'] = 'Неможливо встановити або скинути змінну: ';
-$PHPMAILER_LANG['extension_missing'] = 'Розширення відсутнє: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-vi.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-vi.php
deleted file mode 100644
index c60dade..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-vi.php
+++ /dev/null
@@ -1,26 +0,0 @@
-
- */
-
-$PHPMAILER_LANG['authenticate'] = 'Lỗi SMTP: Không thể xác thực.';
-$PHPMAILER_LANG['connect_host'] = 'Lỗi SMTP: Không thể kết nối máy chủ SMTP.';
-$PHPMAILER_LANG['data_not_accepted'] = 'Lỗi SMTP: Dữ liệu không được chấp nhận.';
-$PHPMAILER_LANG['empty_message'] = 'Không có nội dung';
-$PHPMAILER_LANG['encoding'] = 'Mã hóa không xác định: ';
-$PHPMAILER_LANG['execute'] = 'Không thực hiện được: ';
-$PHPMAILER_LANG['file_access'] = 'Không thể truy cập tệp tin ';
-$PHPMAILER_LANG['file_open'] = 'Lỗi Tập tin: Không thể mở tệp tin: ';
-$PHPMAILER_LANG['from_failed'] = 'Lỗi địa chỉ gửi đi: ';
-$PHPMAILER_LANG['instantiate'] = 'Không dùng được các hàm gửi thư.';
-$PHPMAILER_LANG['invalid_address'] = 'Đại chỉ emai không đúng: ';
-$PHPMAILER_LANG['mailer_not_supported'] = ' trình gửi thư không được hỗ trợ.';
-$PHPMAILER_LANG['provide_address'] = 'Bạn phải cung cấp ít nhất một địa chỉ người nhận.';
-$PHPMAILER_LANG['recipients_failed'] = 'Lỗi SMTP: lỗi địa chỉ người nhận: ';
-$PHPMAILER_LANG['signing'] = 'Lỗi đăng nhập: ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'Lỗi kết nối với SMTP';
-$PHPMAILER_LANG['smtp_error'] = 'Lỗi máy chủ smtp ';
-$PHPMAILER_LANG['variable_set'] = 'Không thể thiết lập hoặc thiết lập lại biến: ';
-//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh.php
deleted file mode 100644
index 3e9e358..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh.php
+++ /dev/null
@@ -1,28 +0,0 @@
-
- * @author Peter Dave Hello <@PeterDaveHello/>
- * @author Jason Chiang
- */
-
-$PHPMAILER_LANG['authenticate'] = 'SMTP 錯誤:登入失敗。';
-$PHPMAILER_LANG['connect_host'] = 'SMTP 錯誤:無法連線到 SMTP 主機。';
-$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 錯誤:無法接受的資料。';
-$PHPMAILER_LANG['empty_message'] = '郵件內容為空';
-$PHPMAILER_LANG['encoding'] = '未知編碼: ';
-$PHPMAILER_LANG['execute'] = '無法執行:';
-$PHPMAILER_LANG['file_access'] = '無法存取檔案:';
-$PHPMAILER_LANG['file_open'] = '檔案錯誤:無法開啟檔案:';
-$PHPMAILER_LANG['from_failed'] = '發送地址錯誤:';
-$PHPMAILER_LANG['instantiate'] = '未知函數呼叫。';
-$PHPMAILER_LANG['invalid_address'] = '因為電子郵件地址無效,無法傳送: ';
-$PHPMAILER_LANG['mailer_not_supported'] = '不支援的發信客戶端。';
-$PHPMAILER_LANG['provide_address'] = '必須提供至少一個收件人地址。';
-$PHPMAILER_LANG['recipients_failed'] = 'SMTP 錯誤:以下收件人地址錯誤:';
-$PHPMAILER_LANG['signing'] = '電子簽章錯誤: ';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP 連線失敗';
-$PHPMAILER_LANG['smtp_error'] = 'SMTP 伺服器錯誤: ';
-$PHPMAILER_LANG['variable_set'] = '無法設定或重設變數: ';
-$PHPMAILER_LANG['extension_missing'] = '遺失模組 Extension: ';
diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php
deleted file mode 100644
index 3753780..0000000
--- a/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php
+++ /dev/null
@@ -1,28 +0,0 @@
-
- * @author young
- * @author Teddysun
- */
-
-$PHPMAILER_LANG['authenticate'] = 'SMTP 错误:登录失败。';
-$PHPMAILER_LANG['connect_host'] = 'SMTP 错误:无法连接到 SMTP 主机。';
-$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误:数据不被接受。';
-$PHPMAILER_LANG['empty_message'] = '邮件正文为空。';
-$PHPMAILER_LANG['encoding'] = '未知编码:';
-$PHPMAILER_LANG['execute'] = '无法执行:';
-$PHPMAILER_LANG['file_access'] = '无法访问文件:';
-$PHPMAILER_LANG['file_open'] = '文件错误:无法打开文件:';
-$PHPMAILER_LANG['from_failed'] = '发送地址错误:';
-$PHPMAILER_LANG['instantiate'] = '未知函数调用。';
-$PHPMAILER_LANG['invalid_address'] = '发送失败,电子邮箱地址是无效的:';
-$PHPMAILER_LANG['mailer_not_supported'] = '发信客户端不被支持。';
-$PHPMAILER_LANG['provide_address'] = '必须提供至少一个收件人地址。';
-$PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误:收件人地址错误:';
-$PHPMAILER_LANG['signing'] = '登录失败:';
-$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP服务器连接失败。';
-$PHPMAILER_LANG['smtp_error'] = 'SMTP服务器出错:';
-$PHPMAILER_LANG['variable_set'] = '无法设置或重置变量:';
-$PHPMAILER_LANG['extension_missing'] = '丢失模块 Extension:';
diff --git a/vendor/phpmailer/phpmailer/src/Exception.php b/vendor/phpmailer/phpmailer/src/Exception.php
deleted file mode 100644
index b1e552f..0000000
--- a/vendor/phpmailer/phpmailer/src/Exception.php
+++ /dev/null
@@ -1,39 +0,0 @@
-
- * @author Jim Jagielski (jimjag)
- * @author Andy Prevost (codeworxtech)
- * @author Brent R. Matzelle (original founder)
- * @copyright 2012 - 2017 Marcus Bointon
- * @copyright 2010 - 2012 Jim Jagielski
- * @copyright 2004 - 2009 Andy Prevost
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
- * @note This program is distributed in the hope that it will be useful - WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-namespace PHPMailer\PHPMailer;
-
-/**
- * PHPMailer exception handler.
- *
- * @author Marcus Bointon
- */
-class Exception extends \Exception
-{
- /**
- * Prettify error message output.
- *
- * @return string
- */
- public function errorMessage()
- {
- return '' . htmlspecialchars($this->getMessage()) . " \n";
- }
-}
diff --git a/vendor/phpmailer/phpmailer/src/OAuth.php b/vendor/phpmailer/phpmailer/src/OAuth.php
deleted file mode 100644
index 0271963..0000000
--- a/vendor/phpmailer/phpmailer/src/OAuth.php
+++ /dev/null
@@ -1,138 +0,0 @@
-
- * @author Jim Jagielski (jimjag)
- * @author Andy Prevost (codeworxtech)
- * @author Brent R. Matzelle (original founder)
- * @copyright 2012 - 2015 Marcus Bointon
- * @copyright 2010 - 2012 Jim Jagielski
- * @copyright 2004 - 2009 Andy Prevost
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
- * @note This program is distributed in the hope that it will be useful - WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-namespace PHPMailer\PHPMailer;
-
-use League\OAuth2\Client\Grant\RefreshToken;
-use League\OAuth2\Client\Provider\AbstractProvider;
-use League\OAuth2\Client\Token\AccessToken;
-
-/**
- * OAuth - OAuth2 authentication wrapper class.
- * Uses the oauth2-client package from the League of Extraordinary Packages.
- *
- * @see http://oauth2-client.thephpleague.com
- *
- * @author Marcus Bointon (Synchro/coolbru)
- */
-class OAuth
-{
- /**
- * An instance of the League OAuth Client Provider.
- *
- * @var AbstractProvider
- */
- protected $provider;
-
- /**
- * The current OAuth access token.
- *
- * @var AccessToken
- */
- protected $oauthToken;
-
- /**
- * The user's email address, usually used as the login ID
- * and also the from address when sending email.
- *
- * @var string
- */
- protected $oauthUserEmail = '';
-
- /**
- * The client secret, generated in the app definition of the service you're connecting to.
- *
- * @var string
- */
- protected $oauthClientSecret = '';
-
- /**
- * The client ID, generated in the app definition of the service you're connecting to.
- *
- * @var string
- */
- protected $oauthClientId = '';
-
- /**
- * The refresh token, used to obtain new AccessTokens.
- *
- * @var string
- */
- protected $oauthRefreshToken = '';
-
- /**
- * OAuth constructor.
- *
- * @param array $options Associative array containing
- * `provider`, `userName`, `clientSecret`, `clientId` and `refreshToken` elements
- */
- public function __construct($options)
- {
- $this->provider = $options['provider'];
- $this->oauthUserEmail = $options['userName'];
- $this->oauthClientSecret = $options['clientSecret'];
- $this->oauthClientId = $options['clientId'];
- $this->oauthRefreshToken = $options['refreshToken'];
- }
-
- /**
- * Get a new RefreshToken.
- *
- * @return RefreshToken
- */
- protected function getGrant()
- {
- return new RefreshToken();
- }
-
- /**
- * Get a new AccessToken.
- *
- * @return AccessToken
- */
- protected function getToken()
- {
- return $this->provider->getAccessToken(
- $this->getGrant(),
- ['refresh_token' => $this->oauthRefreshToken]
- );
- }
-
- /**
- * Generate a base64-encoded OAuth token.
- *
- * @return string
- */
- public function getOauth64()
- {
- // Get a new token if it's not available or has expired
- if (null === $this->oauthToken || $this->oauthToken->hasExpired()) {
- $this->oauthToken = $this->getToken();
- }
-
- return base64_encode(
- 'user=' .
- $this->oauthUserEmail .
- "\001auth=Bearer " .
- $this->oauthToken .
- "\001\001"
- );
- }
-}
diff --git a/vendor/phpmailer/phpmailer/src/PHPMailer.php b/vendor/phpmailer/phpmailer/src/PHPMailer.php
deleted file mode 100644
index d6524af..0000000
--- a/vendor/phpmailer/phpmailer/src/PHPMailer.php
+++ /dev/null
@@ -1,4770 +0,0 @@
-
- * @author Jim Jagielski (jimjag)
- * @author Andy Prevost (codeworxtech)
- * @author Brent R. Matzelle (original founder)
- * @copyright 2012 - 2019 Marcus Bointon
- * @copyright 2010 - 2012 Jim Jagielski
- * @copyright 2004 - 2009 Andy Prevost
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
- * @note This program is distributed in the hope that it will be useful - WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-namespace PHPMailer\PHPMailer;
-
-/**
- * PHPMailer - PHP email creation and transport class.
- *
- * @author Marcus Bointon (Synchro/coolbru)
- * @author Jim Jagielski (jimjag)
- * @author Andy Prevost (codeworxtech)
- * @author Brent R. Matzelle (original founder)
- */
-class PHPMailer
-{
- const CHARSET_ASCII = 'us-ascii';
- const CHARSET_ISO88591 = 'iso-8859-1';
- const CHARSET_UTF8 = 'utf-8';
-
- const CONTENT_TYPE_PLAINTEXT = 'text/plain';
- const CONTENT_TYPE_TEXT_CALENDAR = 'text/calendar';
- const CONTENT_TYPE_TEXT_HTML = 'text/html';
- const CONTENT_TYPE_MULTIPART_ALTERNATIVE = 'multipart/alternative';
- const CONTENT_TYPE_MULTIPART_MIXED = 'multipart/mixed';
- const CONTENT_TYPE_MULTIPART_RELATED = 'multipart/related';
-
- const ENCODING_7BIT = '7bit';
- const ENCODING_8BIT = '8bit';
- const ENCODING_BASE64 = 'base64';
- const ENCODING_BINARY = 'binary';
- const ENCODING_QUOTED_PRINTABLE = 'quoted-printable';
-
- const ENCRYPTION_STARTTLS = 'tls';
- const ENCRYPTION_SMTPS = 'ssl';
-
- const ICAL_METHOD_REQUEST = 'REQUEST';
- const ICAL_METHOD_PUBLISH = 'PUBLISH';
- const ICAL_METHOD_REPLY = 'REPLY';
- const ICAL_METHOD_ADD = 'ADD';
- const ICAL_METHOD_CANCEL = 'CANCEL';
- const ICAL_METHOD_REFRESH = 'REFRESH';
- const ICAL_METHOD_COUNTER = 'COUNTER';
- const ICAL_METHOD_DECLINECOUNTER = 'DECLINECOUNTER';
-
- /**
- * Email priority.
- * Options: null (default), 1 = High, 3 = Normal, 5 = low.
- * When null, the header is not set at all.
- *
- * @var int
- */
- public $Priority;
-
- /**
- * The character set of the message.
- *
- * @var string
- */
- public $CharSet = self::CHARSET_ISO88591;
-
- /**
- * The MIME Content-type of the message.
- *
- * @var string
- */
- public $ContentType = self::CONTENT_TYPE_PLAINTEXT;
-
- /**
- * The message encoding.
- * Options: "8bit", "7bit", "binary", "base64", and "quoted-printable".
- *
- * @var string
- */
- public $Encoding = self::ENCODING_8BIT;
-
- /**
- * Holds the most recent mailer error message.
- *
- * @var string
- */
- public $ErrorInfo = '';
-
- /**
- * The From email address for the message.
- *
- * @var string
- */
- public $From = 'root@localhost';
-
- /**
- * The From name of the message.
- *
- * @var string
- */
- public $FromName = 'Root User';
-
- /**
- * The envelope sender of the message.
- * This will usually be turned into a Return-Path header by the receiver,
- * and is the address that bounces will be sent to.
- * If not empty, will be passed via `-f` to sendmail or as the 'MAIL FROM' value over SMTP.
- *
- * @var string
- */
- public $Sender = '';
-
- /**
- * The Subject of the message.
- *
- * @var string
- */
- public $Subject = '';
-
- /**
- * An HTML or plain text message body.
- * If HTML then call isHTML(true).
- *
- * @var string
- */
- public $Body = '';
-
- /**
- * The plain-text message body.
- * This body can be read by mail clients that do not have HTML email
- * capability such as mutt & Eudora.
- * Clients that can read HTML will view the normal Body.
- *
- * @var string
- */
- public $AltBody = '';
-
- /**
- * An iCal message part body.
- * Only supported in simple alt or alt_inline message types
- * To generate iCal event structures, use classes like EasyPeasyICS or iCalcreator.
- *
- * @see http://sprain.ch/blog/downloads/php-class-easypeasyics-create-ical-files-with-php/
- * @see http://kigkonsult.se/iCalcreator/
- *
- * @var string
- */
- public $Ical = '';
-
- /**
- * Value-array of "method" in Contenttype header "text/calendar"
- *
- * @var string[]
- */
- protected static $IcalMethods = [
- self::ICAL_METHOD_REQUEST,
- self::ICAL_METHOD_PUBLISH,
- self::ICAL_METHOD_REPLY,
- self::ICAL_METHOD_ADD,
- self::ICAL_METHOD_CANCEL,
- self::ICAL_METHOD_REFRESH,
- self::ICAL_METHOD_COUNTER,
- self::ICAL_METHOD_DECLINECOUNTER,
- ];
-
- /**
- * The complete compiled MIME message body.
- *
- * @var string
- */
- protected $MIMEBody = '';
-
- /**
- * The complete compiled MIME message headers.
- *
- * @var string
- */
- protected $MIMEHeader = '';
-
- /**
- * Extra headers that createHeader() doesn't fold in.
- *
- * @var string
- */
- protected $mailHeader = '';
-
- /**
- * Word-wrap the message body to this number of chars.
- * Set to 0 to not wrap. A useful value here is 78, for RFC2822 section 2.1.1 compliance.
- *
- * @see static::STD_LINE_LENGTH
- *
- * @var int
- */
- public $WordWrap = 0;
-
- /**
- * Which method to use to send mail.
- * Options: "mail", "sendmail", or "smtp".
- *
- * @var string
- */
- public $Mailer = 'mail';
-
- /**
- * The path to the sendmail program.
- *
- * @var string
- */
- public $Sendmail = '/usr/sbin/sendmail';
-
- /**
- * Whether mail() uses a fully sendmail-compatible MTA.
- * One which supports sendmail's "-oi -f" options.
- *
- * @var bool
- */
- public $UseSendmailOptions = true;
-
- /**
- * The email address that a reading confirmation should be sent to, also known as read receipt.
- *
- * @var string
- */
- public $ConfirmReadingTo = '';
-
- /**
- * The hostname to use in the Message-ID header and as default HELO string.
- * If empty, PHPMailer attempts to find one with, in order,
- * $_SERVER['SERVER_NAME'], gethostname(), php_uname('n'), or the value
- * 'localhost.localdomain'.
- *
- * @see PHPMailer::$Helo
- *
- * @var string
- */
- public $Hostname = '';
-
- /**
- * An ID to be used in the Message-ID header.
- * If empty, a unique id will be generated.
- * You can set your own, but it must be in the format "",
- * as defined in RFC5322 section 3.6.4 or it will be ignored.
- *
- * @see https://tools.ietf.org/html/rfc5322#section-3.6.4
- *
- * @var string
- */
- public $MessageID = '';
-
- /**
- * The message Date to be used in the Date header.
- * If empty, the current date will be added.
- *
- * @var string
- */
- public $MessageDate = '';
-
- /**
- * SMTP hosts.
- * Either a single hostname or multiple semicolon-delimited hostnames.
- * You can also specify a different port
- * for each host by using this format: [hostname:port]
- * (e.g. "smtp1.example.com:25;smtp2.example.com").
- * You can also specify encryption type, for example:
- * (e.g. "tls://smtp1.example.com:587;ssl://smtp2.example.com:465").
- * Hosts will be tried in order.
- *
- * @var string
- */
- public $Host = 'localhost';
-
- /**
- * The default SMTP server port.
- *
- * @var int
- */
- public $Port = 25;
-
- /**
- * The SMTP HELO/EHLO name used for the SMTP connection.
- * Default is $Hostname. If $Hostname is empty, PHPMailer attempts to find
- * one with the same method described above for $Hostname.
- *
- * @see PHPMailer::$Hostname
- *
- * @var string
- */
- public $Helo = '';
-
- /**
- * What kind of encryption to use on the SMTP connection.
- * Options: '', static::ENCRYPTION_STARTTLS, or static::ENCRYPTION_SMTPS.
- *
- * @var string
- */
- public $SMTPSecure = '';
-
- /**
- * Whether to enable TLS encryption automatically if a server supports it,
- * even if `SMTPSecure` is not set to 'tls'.
- * Be aware that in PHP >= 5.6 this requires that the server's certificates are valid.
- *
- * @var bool
- */
- public $SMTPAutoTLS = true;
-
- /**
- * Whether to use SMTP authentication.
- * Uses the Username and Password properties.
- *
- * @see PHPMailer::$Username
- * @see PHPMailer::$Password
- *
- * @var bool
- */
- public $SMTPAuth = false;
-
- /**
- * Options array passed to stream_context_create when connecting via SMTP.
- *
- * @var array
- */
- public $SMTPOptions = [];
-
- /**
- * SMTP username.
- *
- * @var string
- */
- public $Username = '';
-
- /**
- * SMTP password.
- *
- * @var string
- */
- public $Password = '';
-
- /**
- * SMTP auth type.
- * Options are CRAM-MD5, LOGIN, PLAIN, XOAUTH2, attempted in that order if not specified.
- *
- * @var string
- */
- public $AuthType = '';
-
- /**
- * An instance of the PHPMailer OAuth class.
- *
- * @var OAuth
- */
- protected $oauth;
-
- /**
- * The SMTP server timeout in seconds.
- * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2.
- *
- * @var int
- */
- public $Timeout = 300;
-
- /**
- * Comma separated list of DSN notifications
- * 'NEVER' under no circumstances a DSN must be returned to the sender.
- * If you use NEVER all other notifications will be ignored.
- * 'SUCCESS' will notify you when your mail has arrived at its destination.
- * 'FAILURE' will arrive if an error occurred during delivery.
- * 'DELAY' will notify you if there is an unusual delay in delivery, but the actual
- * delivery's outcome (success or failure) is not yet decided.
- *
- * @see https://tools.ietf.org/html/rfc3461 See section 4.1 for more information about NOTIFY
- */
- public $dsn = '';
-
- /**
- * SMTP class debug output mode.
- * Debug output level.
- * Options:
- * * SMTP::DEBUG_OFF: No output
- * * SMTP::DEBUG_CLIENT: Client messages
- * * SMTP::DEBUG_SERVER: Client and server messages
- * * SMTP::DEBUG_CONNECTION: As SERVER plus connection status
- * * SMTP::DEBUG_LOWLEVEL: Noisy, low-level data output, rarely needed
- *
- * @see SMTP::$do_debug
- *
- * @var int
- */
- public $SMTPDebug = 0;
-
- /**
- * How to handle debug output.
- * Options:
- * * `echo` Output plain-text as-is, appropriate for CLI
- * * `html` Output escaped, line breaks converted to ` `, appropriate for browser output
- * * `error_log` Output to error log as configured in php.ini
- * By default PHPMailer will use `echo` if run from a `cli` or `cli-server` SAPI, `html` otherwise.
- * Alternatively, you can provide a callable expecting two params: a message string and the debug level:
- *
- * ```php
- * $mail->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";};
- * ```
- *
- * Alternatively, you can pass in an instance of a PSR-3 compatible logger, though only `debug`
- * level output is used:
- *
- * ```php
- * $mail->Debugoutput = new myPsr3Logger;
- * ```
- *
- * @see SMTP::$Debugoutput
- *
- * @var string|callable|\Psr\Log\LoggerInterface
- */
- public $Debugoutput = 'echo';
-
- /**
- * Whether to keep SMTP connection open after each message.
- * If this is set to true then to close the connection
- * requires an explicit call to smtpClose().
- *
- * @var bool
- */
- public $SMTPKeepAlive = false;
-
- /**
- * Whether to split multiple to addresses into multiple messages
- * or send them all in one message.
- * Only supported in `mail` and `sendmail` transports, not in SMTP.
- *
- * @var bool
- */
- public $SingleTo = false;
-
- /**
- * Storage for addresses when SingleTo is enabled.
- *
- * @var array
- */
- protected $SingleToArray = [];
-
- /**
- * Whether to generate VERP addresses on send.
- * Only applicable when sending via SMTP.
- *
- * @see https://en.wikipedia.org/wiki/Variable_envelope_return_path
- * @see http://www.postfix.org/VERP_README.html Postfix VERP info
- *
- * @var bool
- */
- public $do_verp = false;
-
- /**
- * Whether to allow sending messages with an empty body.
- *
- * @var bool
- */
- public $AllowEmpty = false;
-
- /**
- * DKIM selector.
- *
- * @var string
- */
- public $DKIM_selector = '';
-
- /**
- * DKIM Identity.
- * Usually the email address used as the source of the email.
- *
- * @var string
- */
- public $DKIM_identity = '';
-
- /**
- * DKIM passphrase.
- * Used if your key is encrypted.
- *
- * @var string
- */
- public $DKIM_passphrase = '';
-
- /**
- * DKIM signing domain name.
- *
- * @example 'example.com'
- *
- * @var string
- */
- public $DKIM_domain = '';
-
- /**
- * DKIM Copy header field values for diagnostic use.
- *
- * @var bool
- */
- public $DKIM_copyHeaderFields = true;
-
- /**
- * DKIM Extra signing headers.
- *
- * @example ['List-Unsubscribe', 'List-Help']
- *
- * @var array
- */
- public $DKIM_extraHeaders = [];
-
- /**
- * DKIM private key file path.
- *
- * @var string
- */
- public $DKIM_private = '';
-
- /**
- * DKIM private key string.
- *
- * If set, takes precedence over `$DKIM_private`.
- *
- * @var string
- */
- public $DKIM_private_string = '';
-
- /**
- * Callback Action function name.
- *
- * The function that handles the result of the send email action.
- * It is called out by send() for each email sent.
- *
- * Value can be any php callable: http://www.php.net/is_callable
- *
- * Parameters:
- * bool $result result of the send action
- * array $to email addresses of the recipients
- * array $cc cc email addresses
- * array $bcc bcc email addresses
- * string $subject the subject
- * string $body the email body
- * string $from email address of sender
- * string $extra extra information of possible use
- * "smtp_transaction_id' => last smtp transaction id
- *
- * @var string
- */
- public $action_function = '';
-
- /**
- * What to put in the X-Mailer header.
- * Options: An empty string for PHPMailer default, whitespace/null for none, or a string to use.
- *
- * @var string|null
- */
- public $XMailer = '';
-
- /**
- * Which validator to use by default when validating email addresses.
- * May be a callable to inject your own validator, but there are several built-in validators.
- * The default validator uses PHP's FILTER_VALIDATE_EMAIL filter_var option.
- *
- * @see PHPMailer::validateAddress()
- *
- * @var string|callable
- */
- public static $validator = 'php';
-
- /**
- * An instance of the SMTP sender class.
- *
- * @var SMTP
- */
- protected $smtp;
-
- /**
- * The array of 'to' names and addresses.
- *
- * @var array
- */
- protected $to = [];
-
- /**
- * The array of 'cc' names and addresses.
- *
- * @var array
- */
- protected $cc = [];
-
- /**
- * The array of 'bcc' names and addresses.
- *
- * @var array
- */
- protected $bcc = [];
-
- /**
- * The array of reply-to names and addresses.
- *
- * @var array
- */
- protected $ReplyTo = [];
-
- /**
- * An array of all kinds of addresses.
- * Includes all of $to, $cc, $bcc.
- *
- * @see PHPMailer::$to
- * @see PHPMailer::$cc
- * @see PHPMailer::$bcc
- *
- * @var array
- */
- protected $all_recipients = [];
-
- /**
- * An array of names and addresses queued for validation.
- * In send(), valid and non duplicate entries are moved to $all_recipients
- * and one of $to, $cc, or $bcc.
- * This array is used only for addresses with IDN.
- *
- * @see PHPMailer::$to
- * @see PHPMailer::$cc
- * @see PHPMailer::$bcc
- * @see PHPMailer::$all_recipients
- *
- * @var array
- */
- protected $RecipientsQueue = [];
-
- /**
- * An array of reply-to names and addresses queued for validation.
- * In send(), valid and non duplicate entries are moved to $ReplyTo.
- * This array is used only for addresses with IDN.
- *
- * @see PHPMailer::$ReplyTo
- *
- * @var array
- */
- protected $ReplyToQueue = [];
-
- /**
- * The array of attachments.
- *
- * @var array
- */
- protected $attachment = [];
-
- /**
- * The array of custom headers.
- *
- * @var array
- */
- protected $CustomHeader = [];
-
- /**
- * The most recent Message-ID (including angular brackets).
- *
- * @var string
- */
- protected $lastMessageID = '';
-
- /**
- * The message's MIME type.
- *
- * @var string
- */
- protected $message_type = '';
-
- /**
- * The array of MIME boundary strings.
- *
- * @var array
- */
- protected $boundary = [];
-
- /**
- * The array of available languages.
- *
- * @var array
- */
- protected $language = [];
-
- /**
- * The number of errors encountered.
- *
- * @var int
- */
- protected $error_count = 0;
-
- /**
- * The S/MIME certificate file path.
- *
- * @var string
- */
- protected $sign_cert_file = '';
-
- /**
- * The S/MIME key file path.
- *
- * @var string
- */
- protected $sign_key_file = '';
-
- /**
- * The optional S/MIME extra certificates ("CA Chain") file path.
- *
- * @var string
- */
- protected $sign_extracerts_file = '';
-
- /**
- * The S/MIME password for the key.
- * Used only if the key is encrypted.
- *
- * @var string
- */
- protected $sign_key_pass = '';
-
- /**
- * Whether to throw exceptions for errors.
- *
- * @var bool
- */
- protected $exceptions = false;
-
- /**
- * Unique ID used for message ID and boundaries.
- *
- * @var string
- */
- protected $uniqueid = '';
-
- /**
- * The PHPMailer Version number.
- *
- * @var string
- */
- const VERSION = '6.1.3';
-
- /**
- * Error severity: message only, continue processing.
- *
- * @var int
- */
- const STOP_MESSAGE = 0;
-
- /**
- * Error severity: message, likely ok to continue processing.
- *
- * @var int
- */
- const STOP_CONTINUE = 1;
-
- /**
- * Error severity: message, plus full stop, critical error reached.
- *
- * @var int
- */
- const STOP_CRITICAL = 2;
-
- /**
- * SMTP RFC standard line ending.
- *
- * @var string
- */
- protected static $LE = "\r\n";
-
- /**
- * The maximum line length supported by mail().
- *
- * Background: mail() will sometimes corrupt messages
- * with headers headers longer than 65 chars, see #818.
- *
- * @var int
- */
- const MAIL_MAX_LINE_LENGTH = 63;
-
- /**
- * The maximum line length allowed by RFC 2822 section 2.1.1.
- *
- * @var int
- */
- const MAX_LINE_LENGTH = 998;
-
- /**
- * The lower maximum line length allowed by RFC 2822 section 2.1.1.
- * This length does NOT include the line break
- * 76 means that lines will be 77 or 78 chars depending on whether
- * the line break format is LF or CRLF; both are valid.
- *
- * @var int
- */
- const STD_LINE_LENGTH = 76;
-
- /**
- * Constructor.
- *
- * @param bool $exceptions Should we throw external exceptions?
- */
- public function __construct($exceptions = null)
- {
- if (null !== $exceptions) {
- $this->exceptions = (bool) $exceptions;
- }
- //Pick an appropriate debug output format automatically
- $this->Debugoutput = (strpos(PHP_SAPI, 'cli') !== false ? 'echo' : 'html');
- }
-
- /**
- * Destructor.
- */
- public function __destruct()
- {
- //Close any open SMTP connection nicely
- $this->smtpClose();
- }
-
- /**
- * Call mail() in a safe_mode-aware fashion.
- * Also, unless sendmail_path points to sendmail (or something that
- * claims to be sendmail), don't pass params (not a perfect fix,
- * but it will do).
- *
- * @param string $to To
- * @param string $subject Subject
- * @param string $body Message Body
- * @param string $header Additional Header(s)
- * @param string|null $params Params
- *
- * @return bool
- */
- private function mailPassthru($to, $subject, $body, $header, $params)
- {
- //Check overloading of mail function to avoid double-encoding
- if (ini_get('mbstring.func_overload') & 1) {
- $subject = $this->secureHeader($subject);
- } else {
- $subject = $this->encodeHeader($this->secureHeader($subject));
- }
- //Calling mail() with null params breaks
- if (!$this->UseSendmailOptions || null === $params) {
- $result = @mail($to, $subject, $body, $header);
- } else {
- $result = @mail($to, $subject, $body, $header, $params);
- }
-
- return $result;
- }
-
- /**
- * Output debugging info via user-defined method.
- * Only generates output if SMTP debug output is enabled (@see SMTP::$do_debug).
- *
- * @see PHPMailer::$Debugoutput
- * @see PHPMailer::$SMTPDebug
- *
- * @param string $str
- */
- protected function edebug($str)
- {
- if ($this->SMTPDebug <= 0) {
- return;
- }
- //Is this a PSR-3 logger?
- if ($this->Debugoutput instanceof \Psr\Log\LoggerInterface) {
- $this->Debugoutput->debug($str);
-
- return;
- }
- //Avoid clash with built-in function names
- if (is_callable($this->Debugoutput) && !in_array($this->Debugoutput, ['error_log', 'html', 'echo'])) {
- call_user_func($this->Debugoutput, $str, $this->SMTPDebug);
-
- return;
- }
- switch ($this->Debugoutput) {
- case 'error_log':
- //Don't output, just log
- error_log($str);
- break;
- case 'html':
- //Cleans up output a bit for a better looking, HTML-safe output
- echo htmlentities(
- preg_replace('/[\r\n]+/', '', $str),
- ENT_QUOTES,
- 'UTF-8'
- ), " \n";
- break;
- case 'echo':
- default:
- //Normalize line breaks
- $str = preg_replace('/\r\n|\r/m', "\n", $str);
- echo gmdate('Y-m-d H:i:s'),
- "\t",
- //Trim trailing space
- trim(
- //Indent for readability, except for trailing break
- str_replace(
- "\n",
- "\n \t ",
- trim($str)
- )
- ),
- "\n";
- }
- }
-
- /**
- * Sets message type to HTML or plain.
- *
- * @param bool $isHtml True for HTML mode
- */
- public function isHTML($isHtml = true)
- {
- if ($isHtml) {
- $this->ContentType = static::CONTENT_TYPE_TEXT_HTML;
- } else {
- $this->ContentType = static::CONTENT_TYPE_PLAINTEXT;
- }
- }
-
- /**
- * Send messages using SMTP.
- */
- public function isSMTP()
- {
- $this->Mailer = 'smtp';
- }
-
- /**
- * Send messages using PHP's mail() function.
- */
- public function isMail()
- {
- $this->Mailer = 'mail';
- }
-
- /**
- * Send messages using $Sendmail.
- */
- public function isSendmail()
- {
- $ini_sendmail_path = ini_get('sendmail_path');
-
- if (false === stripos($ini_sendmail_path, 'sendmail')) {
- $this->Sendmail = '/usr/sbin/sendmail';
- } else {
- $this->Sendmail = $ini_sendmail_path;
- }
- $this->Mailer = 'sendmail';
- }
-
- /**
- * Send messages using qmail.
- */
- public function isQmail()
- {
- $ini_sendmail_path = ini_get('sendmail_path');
-
- if (false === stripos($ini_sendmail_path, 'qmail')) {
- $this->Sendmail = '/var/qmail/bin/qmail-inject';
- } else {
- $this->Sendmail = $ini_sendmail_path;
- }
- $this->Mailer = 'qmail';
- }
-
- /**
- * Add a "To" address.
- *
- * @param string $address The email address to send to
- * @param string $name
- *
- * @throws Exception
- *
- * @return bool true on success, false if address already used or invalid in some way
- */
- public function addAddress($address, $name = '')
- {
- return $this->addOrEnqueueAnAddress('to', $address, $name);
- }
-
- /**
- * Add a "CC" address.
- *
- * @param string $address The email address to send to
- * @param string $name
- *
- * @throws Exception
- *
- * @return bool true on success, false if address already used or invalid in some way
- */
- public function addCC($address, $name = '')
- {
- return $this->addOrEnqueueAnAddress('cc', $address, $name);
- }
-
- /**
- * Add a "BCC" address.
- *
- * @param string $address The email address to send to
- * @param string $name
- *
- * @throws Exception
- *
- * @return bool true on success, false if address already used or invalid in some way
- */
- public function addBCC($address, $name = '')
- {
- return $this->addOrEnqueueAnAddress('bcc', $address, $name);
- }
-
- /**
- * Add a "Reply-To" address.
- *
- * @param string $address The email address to reply to
- * @param string $name
- *
- * @throws Exception
- *
- * @return bool true on success, false if address already used or invalid in some way
- */
- public function addReplyTo($address, $name = '')
- {
- return $this->addOrEnqueueAnAddress('Reply-To', $address, $name);
- }
-
- /**
- * Add an address to one of the recipient arrays or to the ReplyTo array. Because PHPMailer
- * can't validate addresses with an IDN without knowing the PHPMailer::$CharSet (that can still
- * be modified after calling this function), addition of such addresses is delayed until send().
- * Addresses that have been added already return false, but do not throw exceptions.
- *
- * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo'
- * @param string $address The email address to send, resp. to reply to
- * @param string $name
- *
- * @throws Exception
- *
- * @return bool true on success, false if address already used or invalid in some way
- */
- protected function addOrEnqueueAnAddress($kind, $address, $name)
- {
- $address = trim($address);
- $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
- $pos = strrpos($address, '@');
- if (false === $pos) {
- // At-sign is missing.
- $error_message = sprintf(
- '%s (%s): %s',
- $this->lang('invalid_address'),
- $kind,
- $address
- );
- $this->setError($error_message);
- $this->edebug($error_message);
- if ($this->exceptions) {
- throw new Exception($error_message);
- }
-
- return false;
- }
- $params = [$kind, $address, $name];
- // Enqueue addresses with IDN until we know the PHPMailer::$CharSet.
- if (static::idnSupported() && $this->has8bitChars(substr($address, ++$pos))) {
- if ('Reply-To' !== $kind) {
- if (!array_key_exists($address, $this->RecipientsQueue)) {
- $this->RecipientsQueue[$address] = $params;
-
- return true;
- }
- } elseif (!array_key_exists($address, $this->ReplyToQueue)) {
- $this->ReplyToQueue[$address] = $params;
-
- return true;
- }
-
- return false;
- }
-
- // Immediately add standard addresses without IDN.
- return call_user_func_array([$this, 'addAnAddress'], $params);
- }
-
- /**
- * Add an address to one of the recipient arrays or to the ReplyTo array.
- * Addresses that have been added already return false, but do not throw exceptions.
- *
- * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo'
- * @param string $address The email address to send, resp. to reply to
- * @param string $name
- *
- * @throws Exception
- *
- * @return bool true on success, false if address already used or invalid in some way
- */
- protected function addAnAddress($kind, $address, $name = '')
- {
- if (!in_array($kind, ['to', 'cc', 'bcc', 'Reply-To'])) {
- $error_message = sprintf(
- '%s: %s',
- $this->lang('Invalid recipient kind'),
- $kind
- );
- $this->setError($error_message);
- $this->edebug($error_message);
- if ($this->exceptions) {
- throw new Exception($error_message);
- }
-
- return false;
- }
- if (!static::validateAddress($address)) {
- $error_message = sprintf(
- '%s (%s): %s',
- $this->lang('invalid_address'),
- $kind,
- $address
- );
- $this->setError($error_message);
- $this->edebug($error_message);
- if ($this->exceptions) {
- throw new Exception($error_message);
- }
-
- return false;
- }
- if ('Reply-To' !== $kind) {
- if (!array_key_exists(strtolower($address), $this->all_recipients)) {
- $this->{$kind}[] = [$address, $name];
- $this->all_recipients[strtolower($address)] = true;
-
- return true;
- }
- } elseif (!array_key_exists(strtolower($address), $this->ReplyTo)) {
- $this->ReplyTo[strtolower($address)] = [$address, $name];
-
- return true;
- }
-
- return false;
- }
-
- /**
- * Parse and validate a string containing one or more RFC822-style comma-separated email addresses
- * of the form "display name " into an array of name/address pairs.
- * Uses the imap_rfc822_parse_adrlist function if the IMAP extension is available.
- * Note that quotes in the name part are removed.
- *
- * @see http://www.andrew.cmu.edu/user/agreen1/testing/mrbs/web/Mail/RFC822.php A more careful implementation
- *
- * @param string $addrstr The address list string
- * @param bool $useimap Whether to use the IMAP extension to parse the list
- *
- * @return array
- */
- public static function parseAddresses($addrstr, $useimap = true)
- {
- $addresses = [];
- if ($useimap && function_exists('imap_rfc822_parse_adrlist')) {
- //Use this built-in parser if it's available
- $list = imap_rfc822_parse_adrlist($addrstr, '');
- foreach ($list as $address) {
- if (('.SYNTAX-ERROR.' !== $address->host) && static::validateAddress(
- $address->mailbox . '@' . $address->host
- )) {
- $addresses[] = [
- 'name' => (property_exists($address, 'personal') ? $address->personal : ''),
- 'address' => $address->mailbox . '@' . $address->host,
- ];
- }
- }
- } else {
- //Use this simpler parser
- $list = explode(',', $addrstr);
- foreach ($list as $address) {
- $address = trim($address);
- //Is there a separate name part?
- if (strpos($address, '<') === false) {
- //No separate name, just use the whole thing
- if (static::validateAddress($address)) {
- $addresses[] = [
- 'name' => '',
- 'address' => $address,
- ];
- }
- } else {
- list($name, $email) = explode('<', $address);
- $email = trim(str_replace('>', '', $email));
- if (static::validateAddress($email)) {
- $addresses[] = [
- 'name' => trim(str_replace(['"', "'"], '', $name)),
- 'address' => $email,
- ];
- }
- }
- }
- }
-
- return $addresses;
- }
-
- /**
- * Set the From and FromName properties.
- *
- * @param string $address
- * @param string $name
- * @param bool $auto Whether to also set the Sender address, defaults to true
- *
- * @throws Exception
- *
- * @return bool
- */
- public function setFrom($address, $name = '', $auto = true)
- {
- $address = trim($address);
- $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim
- // Don't validate now addresses with IDN. Will be done in send().
- $pos = strrpos($address, '@');
- if ((false === $pos)
- || ((!$this->has8bitChars(substr($address, ++$pos)) || !static::idnSupported())
- && !static::validateAddress($address))
- ) {
- $error_message = sprintf(
- '%s (From): %s',
- $this->lang('invalid_address'),
- $address
- );
- $this->setError($error_message);
- $this->edebug($error_message);
- if ($this->exceptions) {
- throw new Exception($error_message);
- }
-
- return false;
- }
- $this->From = $address;
- $this->FromName = $name;
- if ($auto && empty($this->Sender)) {
- $this->Sender = $address;
- }
-
- return true;
- }
-
- /**
- * Return the Message-ID header of the last email.
- * Technically this is the value from the last time the headers were created,
- * but it's also the message ID of the last sent message except in
- * pathological cases.
- *
- * @return string
- */
- public function getLastMessageID()
- {
- return $this->lastMessageID;
- }
-
- /**
- * Check that a string looks like an email address.
- * Validation patterns supported:
- * * `auto` Pick best pattern automatically;
- * * `pcre8` Use the squiloople.com pattern, requires PCRE > 8.0;
- * * `pcre` Use old PCRE implementation;
- * * `php` Use PHP built-in FILTER_VALIDATE_EMAIL;
- * * `html5` Use the pattern given by the HTML5 spec for 'email' type form input elements.
- * * `noregex` Don't use a regex: super fast, really dumb.
- * Alternatively you may pass in a callable to inject your own validator, for example:
- *
- * ```php
- * PHPMailer::validateAddress('user@example.com', function($address) {
- * return (strpos($address, '@') !== false);
- * });
- * ```
- *
- * You can also set the PHPMailer::$validator static to a callable, allowing built-in methods to use your validator.
- *
- * @param string $address The email address to check
- * @param string|callable $patternselect Which pattern to use
- *
- * @return bool
- */
- public static function validateAddress($address, $patternselect = null)
- {
- if (null === $patternselect) {
- $patternselect = static::$validator;
- }
- if (is_callable($patternselect)) {
- return $patternselect($address);
- }
- //Reject line breaks in addresses; it's valid RFC5322, but not RFC5321
- if (strpos($address, "\n") !== false || strpos($address, "\r") !== false) {
- return false;
- }
- switch ($patternselect) {
- case 'pcre': //Kept for BC
- case 'pcre8':
- /*
- * A more complex and more permissive version of the RFC5322 regex on which FILTER_VALIDATE_EMAIL
- * is based.
- * In addition to the addresses allowed by filter_var, also permits:
- * * dotless domains: `a@b`
- * * comments: `1234 @ local(blah) .machine .example`
- * * quoted elements: `'"test blah"@example.org'`
- * * numeric TLDs: `a@b.123`
- * * unbracketed IPv4 literals: `a@192.168.0.1`
- * * IPv6 literals: 'first.last@[IPv6:a1::]'
- * Not all of these will necessarily work for sending!
- *
- * @see http://squiloople.com/2009/12/20/email-address-validation/
- * @copyright 2009-2010 Michael Rushton
- * Feel free to use and redistribute this code. But please keep this copyright notice.
- */
- return (bool) preg_match(
- '/^(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){255,})(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){65,}@)' .
- '((?>(?>(?>((?>(?>(?>\x0D\x0A)?[\t ])+|(?>[\t ]*\x0D\x0A)?[\t ]+)?)(\((?>(?2)' .
- '(?>[\x01-\x08\x0B\x0C\x0E-\'*-\[\]-\x7F]|\\\[\x00-\x7F]|(?3)))*(?2)\)))+(?2))|(?2))?)' .
- '([!#-\'*+\/-9=?^-~-]+|"(?>(?2)(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\x7F]))*' .
- '(?2)")(?>(?1)\.(?1)(?4))*(?1)@(?!(?1)[a-z0-9-]{64,})(?1)(?>([a-z0-9](?>[a-z0-9-]*[a-z0-9])?)' .
- '(?>(?1)\.(?!(?1)[a-z0-9-]{64,})(?1)(?5)){0,126}|\[(?:(?>IPv6:(?>([a-f0-9]{1,4})(?>:(?6)){7}' .
- '|(?!(?:.*[a-f0-9][:\]]){8,})((?6)(?>:(?6)){0,6})?::(?7)?))|(?>(?>IPv6:(?>(?6)(?>:(?6)){5}:' .
- '|(?!(?:.*[a-f0-9]:){6,})(?8)?::(?>((?6)(?>:(?6)){0,4}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}' .
- '|[1-9]?[0-9])(?>\.(?9)){3}))\])(?1)$/isD',
- $address
- );
- case 'html5':
- /*
- * This is the pattern used in the HTML5 spec for validation of 'email' type form input elements.
- *
- * @see http://www.whatwg.org/specs/web-apps/current-work/#e-mail-state-(type=email)
- */
- return (bool) preg_match(
- '/^[a-zA-Z0-9.!#$%&\'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}' .
- '[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/sD',
- $address
- );
- case 'php':
- default:
- return (bool) filter_var($address, FILTER_VALIDATE_EMAIL);
- }
- }
-
- /**
- * Tells whether IDNs (Internationalized Domain Names) are supported or not. This requires the
- * `intl` and `mbstring` PHP extensions.
- *
- * @return bool `true` if required functions for IDN support are present
- */
- public static function idnSupported()
- {
- return function_exists('idn_to_ascii') && function_exists('mb_convert_encoding');
- }
-
- /**
- * Converts IDN in given email address to its ASCII form, also known as punycode, if possible.
- * Important: Address must be passed in same encoding as currently set in PHPMailer::$CharSet.
- * This function silently returns unmodified address if:
- * - No conversion is necessary (i.e. domain name is not an IDN, or is already in ASCII form)
- * - Conversion to punycode is impossible (e.g. required PHP functions are not available)
- * or fails for any reason (e.g. domain contains characters not allowed in an IDN).
- *
- * @see PHPMailer::$CharSet
- *
- * @param string $address The email address to convert
- *
- * @return string The encoded address in ASCII form
- */
- public function punyencodeAddress($address)
- {
- // Verify we have required functions, CharSet, and at-sign.
- $pos = strrpos($address, '@');
- if (!empty($this->CharSet) &&
- false !== $pos &&
- static::idnSupported()
- ) {
- $domain = substr($address, ++$pos);
- // Verify CharSet string is a valid one, and domain properly encoded in this CharSet.
- if ($this->has8bitChars($domain) && @mb_check_encoding($domain, $this->CharSet)) {
- $domain = mb_convert_encoding($domain, 'UTF-8', $this->CharSet);
- //Ignore IDE complaints about this line - method signature changed in PHP 5.4
- $errorcode = 0;
- $punycode = idn_to_ascii($domain, $errorcode, INTL_IDNA_VARIANT_UTS46);
- if (false !== $punycode) {
- return substr($address, 0, $pos) . $punycode;
- }
- }
- }
-
- return $address;
- }
-
- /**
- * Create a message and send it.
- * Uses the sending method specified by $Mailer.
- *
- * @throws Exception
- *
- * @return bool false on error - See the ErrorInfo property for details of the error
- */
- public function send()
- {
- try {
- if (!$this->preSend()) {
- return false;
- }
-
- return $this->postSend();
- } catch (Exception $exc) {
- $this->mailHeader = '';
- $this->setError($exc->getMessage());
- if ($this->exceptions) {
- throw $exc;
- }
-
- return false;
- }
- }
-
- /**
- * Prepare a message for sending.
- *
- * @throws Exception
- *
- * @return bool
- */
- public function preSend()
- {
- if ('smtp' === $this->Mailer
- || ('mail' === $this->Mailer && stripos(PHP_OS, 'WIN') === 0)
- ) {
- //SMTP mandates RFC-compliant line endings
- //and it's also used with mail() on Windows
- static::setLE("\r\n");
- } else {
- //Maintain backward compatibility with legacy Linux command line mailers
- static::setLE(PHP_EOL);
- }
- //Check for buggy PHP versions that add a header with an incorrect line break
- if ('mail' === $this->Mailer
- && ((PHP_VERSION_ID >= 70000 && PHP_VERSION_ID < 70017)
- || (PHP_VERSION_ID >= 70100 && PHP_VERSION_ID < 70103))
- && ini_get('mail.add_x_header') === '1'
- && stripos(PHP_OS, 'WIN') === 0
- ) {
- trigger_error(
- 'Your version of PHP is affected by a bug that may result in corrupted messages.' .
- ' To fix it, switch to sending using SMTP, disable the mail.add_x_header option in' .
- ' your php.ini, switch to MacOS or Linux, or upgrade your PHP to version 7.0.17+ or 7.1.3+.',
- E_USER_WARNING
- );
- }
-
- try {
- $this->error_count = 0; // Reset errors
- $this->mailHeader = '';
-
- // Dequeue recipient and Reply-To addresses with IDN
- foreach (array_merge($this->RecipientsQueue, $this->ReplyToQueue) as $params) {
- $params[1] = $this->punyencodeAddress($params[1]);
- call_user_func_array([$this, 'addAnAddress'], $params);
- }
- if (count($this->to) + count($this->cc) + count($this->bcc) < 1) {
- throw new Exception($this->lang('provide_address'), self::STOP_CRITICAL);
- }
-
- // Validate From, Sender, and ConfirmReadingTo addresses
- foreach (['From', 'Sender', 'ConfirmReadingTo'] as $address_kind) {
- $this->$address_kind = trim($this->$address_kind);
- if (empty($this->$address_kind)) {
- continue;
- }
- $this->$address_kind = $this->punyencodeAddress($this->$address_kind);
- if (!static::validateAddress($this->$address_kind)) {
- $error_message = sprintf(
- '%s (%s): %s',
- $this->lang('invalid_address'),
- $address_kind,
- $this->$address_kind
- );
- $this->setError($error_message);
- $this->edebug($error_message);
- if ($this->exceptions) {
- throw new Exception($error_message);
- }
-
- return false;
- }
- }
-
- // Set whether the message is multipart/alternative
- if ($this->alternativeExists()) {
- $this->ContentType = static::CONTENT_TYPE_MULTIPART_ALTERNATIVE;
- }
-
- $this->setMessageType();
- // Refuse to send an empty message unless we are specifically allowing it
- if (!$this->AllowEmpty && empty($this->Body)) {
- throw new Exception($this->lang('empty_message'), self::STOP_CRITICAL);
- }
-
- //Trim subject consistently
- $this->Subject = trim($this->Subject);
- // Create body before headers in case body makes changes to headers (e.g. altering transfer encoding)
- $this->MIMEHeader = '';
- $this->MIMEBody = $this->createBody();
- // createBody may have added some headers, so retain them
- $tempheaders = $this->MIMEHeader;
- $this->MIMEHeader = $this->createHeader();
- $this->MIMEHeader .= $tempheaders;
-
- // To capture the complete message when using mail(), create
- // an extra header list which createHeader() doesn't fold in
- if ('mail' === $this->Mailer) {
- if (count($this->to) > 0) {
- $this->mailHeader .= $this->addrAppend('To', $this->to);
- } else {
- $this->mailHeader .= $this->headerLine('To', 'undisclosed-recipients:;');
- }
- $this->mailHeader .= $this->headerLine(
- 'Subject',
- $this->encodeHeader($this->secureHeader($this->Subject))
- );
- }
-
- // Sign with DKIM if enabled
- if (!empty($this->DKIM_domain)
- && !empty($this->DKIM_selector)
- && (!empty($this->DKIM_private_string)
- || (!empty($this->DKIM_private)
- && static::isPermittedPath($this->DKIM_private)
- && file_exists($this->DKIM_private)
- )
- )
- ) {
- $header_dkim = $this->DKIM_Add(
- $this->MIMEHeader . $this->mailHeader,
- $this->encodeHeader($this->secureHeader($this->Subject)),
- $this->MIMEBody
- );
- $this->MIMEHeader = rtrim($this->MIMEHeader, "\r\n ") . static::$LE .
- static::normalizeBreaks($header_dkim) . static::$LE;
- }
-
- return true;
- } catch (Exception $exc) {
- $this->setError($exc->getMessage());
- if ($this->exceptions) {
- throw $exc;
- }
-
- return false;
- }
- }
-
- /**
- * Actually send a message via the selected mechanism.
- *
- * @throws Exception
- *
- * @return bool
- */
- public function postSend()
- {
- try {
- // Choose the mailer and send through it
- switch ($this->Mailer) {
- case 'sendmail':
- case 'qmail':
- return $this->sendmailSend($this->MIMEHeader, $this->MIMEBody);
- case 'smtp':
- return $this->smtpSend($this->MIMEHeader, $this->MIMEBody);
- case 'mail':
- return $this->mailSend($this->MIMEHeader, $this->MIMEBody);
- default:
- $sendMethod = $this->Mailer . 'Send';
- if (method_exists($this, $sendMethod)) {
- return $this->$sendMethod($this->MIMEHeader, $this->MIMEBody);
- }
-
- return $this->mailSend($this->MIMEHeader, $this->MIMEBody);
- }
- } catch (Exception $exc) {
- $this->setError($exc->getMessage());
- $this->edebug($exc->getMessage());
- if ($this->exceptions) {
- throw $exc;
- }
- }
-
- return false;
- }
-
- /**
- * Send mail using the $Sendmail program.
- *
- * @see PHPMailer::$Sendmail
- *
- * @param string $header The message headers
- * @param string $body The message body
- *
- * @throws Exception
- *
- * @return bool
- */
- protected function sendmailSend($header, $body)
- {
- $header = rtrim($header, "\r\n ") . static::$LE . static::$LE;
-
- // CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped.
- if (!empty($this->Sender) && self::isShellSafe($this->Sender)) {
- if ('qmail' === $this->Mailer) {
- $sendmailFmt = '%s -f%s';
- } else {
- $sendmailFmt = '%s -oi -f%s -t';
- }
- } elseif ('qmail' === $this->Mailer) {
- $sendmailFmt = '%s';
- } else {
- $sendmailFmt = '%s -oi -t';
- }
-
- $sendmail = sprintf($sendmailFmt, escapeshellcmd($this->Sendmail), $this->Sender);
-
- if ($this->SingleTo) {
- foreach ($this->SingleToArray as $toAddr) {
- $mail = @popen($sendmail, 'w');
- if (!$mail) {
- throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
- }
- fwrite($mail, 'To: ' . $toAddr . "\n");
- fwrite($mail, $header);
- fwrite($mail, $body);
- $result = pclose($mail);
- $this->doCallback(
- ($result === 0),
- [$toAddr],
- $this->cc,
- $this->bcc,
- $this->Subject,
- $body,
- $this->From,
- []
- );
- if (0 !== $result) {
- throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
- }
- }
- } else {
- $mail = @popen($sendmail, 'w');
- if (!$mail) {
- throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
- }
- fwrite($mail, $header);
- fwrite($mail, $body);
- $result = pclose($mail);
- $this->doCallback(
- ($result === 0),
- $this->to,
- $this->cc,
- $this->bcc,
- $this->Subject,
- $body,
- $this->From,
- []
- );
- if (0 !== $result) {
- throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL);
- }
- }
-
- return true;
- }
-
- /**
- * Fix CVE-2016-10033 and CVE-2016-10045 by disallowing potentially unsafe shell characters.
- * Note that escapeshellarg and escapeshellcmd are inadequate for our purposes, especially on Windows.
- *
- * @see https://github.com/PHPMailer/PHPMailer/issues/924 CVE-2016-10045 bug report
- *
- * @param string $string The string to be validated
- *
- * @return bool
- */
- protected static function isShellSafe($string)
- {
- // Future-proof
- if (escapeshellcmd($string) !== $string
- || !in_array(escapeshellarg($string), ["'$string'", "\"$string\""])
- ) {
- return false;
- }
-
- $length = strlen($string);
-
- for ($i = 0; $i < $length; ++$i) {
- $c = $string[$i];
-
- // All other characters have a special meaning in at least one common shell, including = and +.
- // Full stop (.) has a special meaning in cmd.exe, but its impact should be negligible here.
- // Note that this does permit non-Latin alphanumeric characters based on the current locale.
- if (!ctype_alnum($c) && strpos('@_-.', $c) === false) {
- return false;
- }
- }
-
- return true;
- }
-
- /**
- * Check whether a file path is of a permitted type.
- * Used to reject URLs and phar files from functions that access local file paths,
- * such as addAttachment.
- *
- * @param string $path A relative or absolute path to a file
- *
- * @return bool
- */
- protected static function isPermittedPath($path)
- {
- return !preg_match('#^[a-z]+://#i', $path);
- }
-
- /**
- * Send mail using the PHP mail() function.
- *
- * @see http://www.php.net/manual/en/book.mail.php
- *
- * @param string $header The message headers
- * @param string $body The message body
- *
- * @throws Exception
- *
- * @return bool
- */
- protected function mailSend($header, $body)
- {
- $header = rtrim($header, "\r\n ") . static::$LE . static::$LE;
-
- $toArr = [];
- foreach ($this->to as $toaddr) {
- $toArr[] = $this->addrFormat($toaddr);
- }
- $to = implode(', ', $toArr);
-
- $params = null;
- //This sets the SMTP envelope sender which gets turned into a return-path header by the receiver
- //A space after `-f` is optional, but there is a long history of its presence
- //causing problems, so we don't use one
- //Exim docs: http://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_exim_command_line.html
- //Sendmail docs: http://www.sendmail.org/~ca/email/man/sendmail.html
- //Qmail docs: http://www.qmail.org/man/man8/qmail-inject.html
- //Example problem: https://www.drupal.org/node/1057954
- // CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped.
- if (!empty($this->Sender) && static::validateAddress($this->Sender) && self::isShellSafe($this->Sender)) {
- $params = sprintf('-f%s', $this->Sender);
- }
- if (!empty($this->Sender) && static::validateAddress($this->Sender)) {
- $old_from = ini_get('sendmail_from');
- ini_set('sendmail_from', $this->Sender);
- }
- $result = false;
- if ($this->SingleTo && count($toArr) > 1) {
- foreach ($toArr as $toAddr) {
- $result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params);
- $this->doCallback($result, [$toAddr], $this->cc, $this->bcc, $this->Subject, $body, $this->From, []);
- }
- } else {
- $result = $this->mailPassthru($to, $this->Subject, $body, $header, $params);
- $this->doCallback($result, $this->to, $this->cc, $this->bcc, $this->Subject, $body, $this->From, []);
- }
- if (isset($old_from)) {
- ini_set('sendmail_from', $old_from);
- }
- if (!$result) {
- throw new Exception($this->lang('instantiate'), self::STOP_CRITICAL);
- }
-
- return true;
- }
-
- /**
- * Get an instance to use for SMTP operations.
- * Override this function to load your own SMTP implementation,
- * or set one with setSMTPInstance.
- *
- * @return SMTP
- */
- public function getSMTPInstance()
- {
- if (!is_object($this->smtp)) {
- $this->smtp = new SMTP();
- }
-
- return $this->smtp;
- }
-
- /**
- * Provide an instance to use for SMTP operations.
- *
- * @return SMTP
- */
- public function setSMTPInstance(SMTP $smtp)
- {
- $this->smtp = $smtp;
-
- return $this->smtp;
- }
-
- /**
- * Send mail via SMTP.
- * Returns false if there is a bad MAIL FROM, RCPT, or DATA input.
- *
- * @see PHPMailer::setSMTPInstance() to use a different class.
- *
- * @uses \PHPMailer\PHPMailer\SMTP
- *
- * @param string $header The message headers
- * @param string $body The message body
- *
- * @throws Exception
- *
- * @return bool
- */
- protected function smtpSend($header, $body)
- {
- $header = rtrim($header, "\r\n ") . static::$LE . static::$LE;
- $bad_rcpt = [];
- if (!$this->smtpConnect($this->SMTPOptions)) {
- throw new Exception($this->lang('smtp_connect_failed'), self::STOP_CRITICAL);
- }
- //Sender already validated in preSend()
- if ('' === $this->Sender) {
- $smtp_from = $this->From;
- } else {
- $smtp_from = $this->Sender;
- }
- if (!$this->smtp->mail($smtp_from)) {
- $this->setError($this->lang('from_failed') . $smtp_from . ' : ' . implode(',', $this->smtp->getError()));
- throw new Exception($this->ErrorInfo, self::STOP_CRITICAL);
- }
-
- $callbacks = [];
- // Attempt to send to all recipients
- foreach ([$this->to, $this->cc, $this->bcc] as $togroup) {
- foreach ($togroup as $to) {
- if (!$this->smtp->recipient($to[0], $this->dsn)) {
- $error = $this->smtp->getError();
- $bad_rcpt[] = ['to' => $to[0], 'error' => $error['detail']];
- $isSent = false;
- } else {
- $isSent = true;
- }
-
- $callbacks[] = ['issent'=>$isSent, 'to'=>$to[0]];
- }
- }
-
- // Only send the DATA command if we have viable recipients
- if ((count($this->all_recipients) > count($bad_rcpt)) && !$this->smtp->data($header . $body)) {
- throw new Exception($this->lang('data_not_accepted'), self::STOP_CRITICAL);
- }
-
- $smtp_transaction_id = $this->smtp->getLastTransactionID();
-
- if ($this->SMTPKeepAlive) {
- $this->smtp->reset();
- } else {
- $this->smtp->quit();
- $this->smtp->close();
- }
-
- foreach ($callbacks as $cb) {
- $this->doCallback(
- $cb['issent'],
- [$cb['to']],
- [],
- [],
- $this->Subject,
- $body,
- $this->From,
- ['smtp_transaction_id' => $smtp_transaction_id]
- );
- }
-
- //Create error message for any bad addresses
- if (count($bad_rcpt) > 0) {
- $errstr = '';
- foreach ($bad_rcpt as $bad) {
- $errstr .= $bad['to'] . ': ' . $bad['error'];
- }
- throw new Exception($this->lang('recipients_failed') . $errstr, self::STOP_CONTINUE);
- }
-
- return true;
- }
-
- /**
- * Initiate a connection to an SMTP server.
- * Returns false if the operation failed.
- *
- * @param array $options An array of options compatible with stream_context_create()
- *
- * @throws Exception
- *
- * @uses \PHPMailer\PHPMailer\SMTP
- *
- * @return bool
- */
- public function smtpConnect($options = null)
- {
- if (null === $this->smtp) {
- $this->smtp = $this->getSMTPInstance();
- }
-
- //If no options are provided, use whatever is set in the instance
- if (null === $options) {
- $options = $this->SMTPOptions;
- }
-
- // Already connected?
- if ($this->smtp->connected()) {
- return true;
- }
-
- $this->smtp->setTimeout($this->Timeout);
- $this->smtp->setDebugLevel($this->SMTPDebug);
- $this->smtp->setDebugOutput($this->Debugoutput);
- $this->smtp->setVerp($this->do_verp);
- $hosts = explode(';', $this->Host);
- $lastexception = null;
-
- foreach ($hosts as $hostentry) {
- $hostinfo = [];
- if (!preg_match(
- '/^((ssl|tls):\/\/)*([a-zA-Z\d.-]*|\[[a-fA-F\d:]+]):?(\d*)$/',
- trim($hostentry),
- $hostinfo
- )) {
- $this->edebug($this->lang('connect_host') . ' ' . $hostentry);
- // Not a valid host entry
- continue;
- }
- // $hostinfo[2]: optional ssl or tls prefix
- // $hostinfo[3]: the hostname
- // $hostinfo[4]: optional port number
- // The host string prefix can temporarily override the current setting for SMTPSecure
- // If it's not specified, the default value is used
-
- //Check the host name is a valid name or IP address before trying to use it
- if (!static::isValidHost($hostinfo[3])) {
- $this->edebug($this->lang('connect_host') . ' ' . $hostentry);
- continue;
- }
- $prefix = '';
- $secure = $this->SMTPSecure;
- $tls = (static::ENCRYPTION_STARTTLS === $this->SMTPSecure);
- if ('ssl' === $hostinfo[2] || ('' === $hostinfo[2] && static::ENCRYPTION_SMTPS === $this->SMTPSecure)) {
- $prefix = 'ssl://';
- $tls = false; // Can't have SSL and TLS at the same time
- $secure = static::ENCRYPTION_SMTPS;
- } elseif ('tls' === $hostinfo[2]) {
- $tls = true;
- // tls doesn't use a prefix
- $secure = static::ENCRYPTION_STARTTLS;
- }
- //Do we need the OpenSSL extension?
- $sslext = defined('OPENSSL_ALGO_SHA256');
- if (static::ENCRYPTION_STARTTLS === $secure || static::ENCRYPTION_SMTPS === $secure) {
- //Check for an OpenSSL constant rather than using extension_loaded, which is sometimes disabled
- if (!$sslext) {
- throw new Exception($this->lang('extension_missing') . 'openssl', self::STOP_CRITICAL);
- }
- }
- $host = $hostinfo[3];
- $port = $this->Port;
- $tport = (int) $hostinfo[4];
- if ($tport > 0 && $tport < 65536) {
- $port = $tport;
- }
- if ($this->smtp->connect($prefix . $host, $port, $this->Timeout, $options)) {
- try {
- if ($this->Helo) {
- $hello = $this->Helo;
- } else {
- $hello = $this->serverHostname();
- }
- $this->smtp->hello($hello);
- //Automatically enable TLS encryption if:
- // * it's not disabled
- // * we have openssl extension
- // * we are not already using SSL
- // * the server offers STARTTLS
- if ($this->SMTPAutoTLS && $sslext && 'ssl' !== $secure && $this->smtp->getServerExt('STARTTLS')) {
- $tls = true;
- }
- if ($tls) {
- if (!$this->smtp->startTLS()) {
- throw new Exception($this->lang('connect_host'));
- }
- // We must resend EHLO after TLS negotiation
- $this->smtp->hello($hello);
- }
- if ($this->SMTPAuth && !$this->smtp->authenticate(
- $this->Username,
- $this->Password,
- $this->AuthType,
- $this->oauth
- )) {
- throw new Exception($this->lang('authenticate'));
- }
-
- return true;
- } catch (Exception $exc) {
- $lastexception = $exc;
- $this->edebug($exc->getMessage());
- // We must have connected, but then failed TLS or Auth, so close connection nicely
- $this->smtp->quit();
- }
- }
- }
- // If we get here, all connection attempts have failed, so close connection hard
- $this->smtp->close();
- // As we've caught all exceptions, just report whatever the last one was
- if ($this->exceptions && null !== $lastexception) {
- throw $lastexception;
- }
-
- return false;
- }
-
- /**
- * Close the active SMTP session if one exists.
- */
- public function smtpClose()
- {
- if ((null !== $this->smtp) && $this->smtp->connected()) {
- $this->smtp->quit();
- $this->smtp->close();
- }
- }
-
- /**
- * Set the language for error messages.
- * Returns false if it cannot load the language file.
- * The default language is English.
- *
- * @param string $langcode ISO 639-1 2-character language code (e.g. French is "fr")
- * @param string $lang_path Path to the language file directory, with trailing separator (slash)
- *
- * @return bool
- */
- public function setLanguage($langcode = 'en', $lang_path = '')
- {
- // Backwards compatibility for renamed language codes
- $renamed_langcodes = [
- 'br' => 'pt_br',
- 'cz' => 'cs',
- 'dk' => 'da',
- 'no' => 'nb',
- 'se' => 'sv',
- 'rs' => 'sr',
- 'tg' => 'tl',
- ];
-
- if (isset($renamed_langcodes[$langcode])) {
- $langcode = $renamed_langcodes[$langcode];
- }
-
- // Define full set of translatable strings in English
- $PHPMAILER_LANG = [
- 'authenticate' => 'SMTP Error: Could not authenticate.',
- 'connect_host' => 'SMTP Error: Could not connect to SMTP host.',
- 'data_not_accepted' => 'SMTP Error: data not accepted.',
- 'empty_message' => 'Message body empty',
- 'encoding' => 'Unknown encoding: ',
- 'execute' => 'Could not execute: ',
- 'file_access' => 'Could not access file: ',
- 'file_open' => 'File Error: Could not open file: ',
- 'from_failed' => 'The following From address failed: ',
- 'instantiate' => 'Could not instantiate mail function.',
- 'invalid_address' => 'Invalid address: ',
- 'mailer_not_supported' => ' mailer is not supported.',
- 'provide_address' => 'You must provide at least one recipient email address.',
- 'recipients_failed' => 'SMTP Error: The following recipients failed: ',
- 'signing' => 'Signing Error: ',
- 'smtp_connect_failed' => 'SMTP connect() failed.',
- 'smtp_error' => 'SMTP server error: ',
- 'variable_set' => 'Cannot set or reset variable: ',
- 'extension_missing' => 'Extension missing: ',
- ];
- if (empty($lang_path)) {
- // Calculate an absolute path so it can work if CWD is not here
- $lang_path = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'language' . DIRECTORY_SEPARATOR;
- }
- //Validate $langcode
- if (!preg_match('/^[a-z]{2}(?:_[a-zA-Z]{2})?$/', $langcode)) {
- $langcode = 'en';
- }
- $foundlang = true;
- $lang_file = $lang_path . 'phpmailer.lang-' . $langcode . '.php';
- // There is no English translation file
- if ('en' !== $langcode) {
- // Make sure language file path is readable
- if (!static::isPermittedPath($lang_file) || !file_exists($lang_file)) {
- $foundlang = false;
- } else {
- // Overwrite language-specific strings.
- // This way we'll never have missing translation keys.
- $foundlang = include $lang_file;
- }
- }
- $this->language = $PHPMAILER_LANG;
-
- return (bool) $foundlang; // Returns false if language not found
- }
-
- /**
- * Get the array of strings for the current language.
- *
- * @return array
- */
- public function getTranslations()
- {
- return $this->language;
- }
-
- /**
- * Create recipient headers.
- *
- * @param string $type
- * @param array $addr An array of recipients,
- * where each recipient is a 2-element indexed array with element 0 containing an address
- * and element 1 containing a name, like:
- * [['joe@example.com', 'Joe User'], ['zoe@example.com', 'Zoe User']]
- *
- * @return string
- */
- public function addrAppend($type, $addr)
- {
- $addresses = [];
- foreach ($addr as $address) {
- $addresses[] = $this->addrFormat($address);
- }
-
- return $type . ': ' . implode(', ', $addresses) . static::$LE;
- }
-
- /**
- * Format an address for use in a message header.
- *
- * @param array $addr A 2-element indexed array, element 0 containing an address, element 1 containing a name like
- * ['joe@example.com', 'Joe User']
- *
- * @return string
- */
- public function addrFormat($addr)
- {
- if (empty($addr[1])) { // No name provided
- return $this->secureHeader($addr[0]);
- }
-
- return $this->encodeHeader($this->secureHeader($addr[1]), 'phrase') .
- ' <' . $this->secureHeader($addr[0]) . '>';
- }
-
- /**
- * Word-wrap message.
- * For use with mailers that do not automatically perform wrapping
- * and for quoted-printable encoded messages.
- * Original written by philippe.
- *
- * @param string $message The message to wrap
- * @param int $length The line length to wrap to
- * @param bool $qp_mode Whether to run in Quoted-Printable mode
- *
- * @return string
- */
- public function wrapText($message, $length, $qp_mode = false)
- {
- if ($qp_mode) {
- $soft_break = sprintf(' =%s', static::$LE);
- } else {
- $soft_break = static::$LE;
- }
- // If utf-8 encoding is used, we will need to make sure we don't
- // split multibyte characters when we wrap
- $is_utf8 = static::CHARSET_UTF8 === strtolower($this->CharSet);
- $lelen = strlen(static::$LE);
- $crlflen = strlen(static::$LE);
-
- $message = static::normalizeBreaks($message);
- //Remove a trailing line break
- if (substr($message, -$lelen) === static::$LE) {
- $message = substr($message, 0, -$lelen);
- }
-
- //Split message into lines
- $lines = explode(static::$LE, $message);
- //Message will be rebuilt in here
- $message = '';
- foreach ($lines as $line) {
- $words = explode(' ', $line);
- $buf = '';
- $firstword = true;
- foreach ($words as $word) {
- if ($qp_mode && (strlen($word) > $length)) {
- $space_left = $length - strlen($buf) - $crlflen;
- if (!$firstword) {
- if ($space_left > 20) {
- $len = $space_left;
- if ($is_utf8) {
- $len = $this->utf8CharBoundary($word, $len);
- } elseif ('=' === substr($word, $len - 1, 1)) {
- --$len;
- } elseif ('=' === substr($word, $len - 2, 1)) {
- $len -= 2;
- }
- $part = substr($word, 0, $len);
- $word = substr($word, $len);
- $buf .= ' ' . $part;
- $message .= $buf . sprintf('=%s', static::$LE);
- } else {
- $message .= $buf . $soft_break;
- }
- $buf = '';
- }
- while ($word !== '') {
- if ($length <= 0) {
- break;
- }
- $len = $length;
- if ($is_utf8) {
- $len = $this->utf8CharBoundary($word, $len);
- } elseif ('=' === substr($word, $len - 1, 1)) {
- --$len;
- } elseif ('=' === substr($word, $len - 2, 1)) {
- $len -= 2;
- }
- $part = substr($word, 0, $len);
- $word = (string) substr($word, $len);
-
- if ($word !== '') {
- $message .= $part . sprintf('=%s', static::$LE);
- } else {
- $buf = $part;
- }
- }
- } else {
- $buf_o = $buf;
- if (!$firstword) {
- $buf .= ' ';
- }
- $buf .= $word;
-
- if ('' !== $buf_o && strlen($buf) > $length) {
- $message .= $buf_o . $soft_break;
- $buf = $word;
- }
- }
- $firstword = false;
- }
- $message .= $buf . static::$LE;
- }
-
- return $message;
- }
-
- /**
- * Find the last character boundary prior to $maxLength in a utf-8
- * quoted-printable encoded string.
- * Original written by Colin Brown.
- *
- * @param string $encodedText utf-8 QP text
- * @param int $maxLength Find the last character boundary prior to this length
- *
- * @return int
- */
- public function utf8CharBoundary($encodedText, $maxLength)
- {
- $foundSplitPos = false;
- $lookBack = 3;
- while (!$foundSplitPos) {
- $lastChunk = substr($encodedText, $maxLength - $lookBack, $lookBack);
- $encodedCharPos = strpos($lastChunk, '=');
- if (false !== $encodedCharPos) {
- // Found start of encoded character byte within $lookBack block.
- // Check the encoded byte value (the 2 chars after the '=')
- $hex = substr($encodedText, $maxLength - $lookBack + $encodedCharPos + 1, 2);
- $dec = hexdec($hex);
- if ($dec < 128) {
- // Single byte character.
- // If the encoded char was found at pos 0, it will fit
- // otherwise reduce maxLength to start of the encoded char
- if ($encodedCharPos > 0) {
- $maxLength -= $lookBack - $encodedCharPos;
- }
- $foundSplitPos = true;
- } elseif ($dec >= 192) {
- // First byte of a multi byte character
- // Reduce maxLength to split at start of character
- $maxLength -= $lookBack - $encodedCharPos;
- $foundSplitPos = true;
- } elseif ($dec < 192) {
- // Middle byte of a multi byte character, look further back
- $lookBack += 3;
- }
- } else {
- // No encoded character found
- $foundSplitPos = true;
- }
- }
-
- return $maxLength;
- }
-
- /**
- * Apply word wrapping to the message body.
- * Wraps the message body to the number of chars set in the WordWrap property.
- * You should only do this to plain-text bodies as wrapping HTML tags may break them.
- * This is called automatically by createBody(), so you don't need to call it yourself.
- */
- public function setWordWrap()
- {
- if ($this->WordWrap < 1) {
- return;
- }
-
- switch ($this->message_type) {
- case 'alt':
- case 'alt_inline':
- case 'alt_attach':
- case 'alt_inline_attach':
- $this->AltBody = $this->wrapText($this->AltBody, $this->WordWrap);
- break;
- default:
- $this->Body = $this->wrapText($this->Body, $this->WordWrap);
- break;
- }
- }
-
- /**
- * Assemble message headers.
- *
- * @return string The assembled headers
- */
- public function createHeader()
- {
- $result = '';
-
- $result .= $this->headerLine('Date', '' === $this->MessageDate ? self::rfcDate() : $this->MessageDate);
-
- // To be created automatically by mail()
- if ($this->SingleTo) {
- if ('mail' !== $this->Mailer) {
- foreach ($this->to as $toaddr) {
- $this->SingleToArray[] = $this->addrFormat($toaddr);
- }
- }
- } elseif (count($this->to) > 0) {
- if ('mail' !== $this->Mailer) {
- $result .= $this->addrAppend('To', $this->to);
- }
- } elseif (count($this->cc) === 0) {
- $result .= $this->headerLine('To', 'undisclosed-recipients:;');
- }
-
- $result .= $this->addrAppend('From', [[trim($this->From), $this->FromName]]);
-
- // sendmail and mail() extract Cc from the header before sending
- if (count($this->cc) > 0) {
- $result .= $this->addrAppend('Cc', $this->cc);
- }
-
- // sendmail and mail() extract Bcc from the header before sending
- if ((
- 'sendmail' === $this->Mailer || 'qmail' === $this->Mailer || 'mail' === $this->Mailer
- )
- && count($this->bcc) > 0
- ) {
- $result .= $this->addrAppend('Bcc', $this->bcc);
- }
-
- if (count($this->ReplyTo) > 0) {
- $result .= $this->addrAppend('Reply-To', $this->ReplyTo);
- }
-
- // mail() sets the subject itself
- if ('mail' !== $this->Mailer) {
- $result .= $this->headerLine('Subject', $this->encodeHeader($this->secureHeader($this->Subject)));
- }
-
- // Only allow a custom message ID if it conforms to RFC 5322 section 3.6.4
- // https://tools.ietf.org/html/rfc5322#section-3.6.4
- if ('' !== $this->MessageID && preg_match('/^<.*@.*>$/', $this->MessageID)) {
- $this->lastMessageID = $this->MessageID;
- } else {
- $this->lastMessageID = sprintf('<%s@%s>', $this->uniqueid, $this->serverHostname());
- }
- $result .= $this->headerLine('Message-ID', $this->lastMessageID);
- if (null !== $this->Priority) {
- $result .= $this->headerLine('X-Priority', $this->Priority);
- }
- if ('' === $this->XMailer) {
- $result .= $this->headerLine(
- 'X-Mailer',
- 'PHPMailer ' . self::VERSION . ' (https://github.com/PHPMailer/PHPMailer)'
- );
- } else {
- $myXmailer = trim($this->XMailer);
- if ($myXmailer) {
- $result .= $this->headerLine('X-Mailer', $myXmailer);
- }
- }
-
- if ('' !== $this->ConfirmReadingTo) {
- $result .= $this->headerLine('Disposition-Notification-To', '<' . $this->ConfirmReadingTo . '>');
- }
-
- // Add custom headers
- foreach ($this->CustomHeader as $header) {
- $result .= $this->headerLine(
- trim($header[0]),
- $this->encodeHeader(trim($header[1]))
- );
- }
- if (!$this->sign_key_file) {
- $result .= $this->headerLine('MIME-Version', '1.0');
- $result .= $this->getMailMIME();
- }
-
- return $result;
- }
-
- /**
- * Get the message MIME type headers.
- *
- * @return string
- */
- public function getMailMIME()
- {
- $result = '';
- $ismultipart = true;
- switch ($this->message_type) {
- case 'inline':
- $result .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_RELATED . ';');
- $result .= $this->textLine(' boundary="' . $this->boundary[1] . '"');
- break;
- case 'attach':
- case 'inline_attach':
- case 'alt_attach':
- case 'alt_inline_attach':
- $result .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_MIXED . ';');
- $result .= $this->textLine(' boundary="' . $this->boundary[1] . '"');
- break;
- case 'alt':
- case 'alt_inline':
- $result .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_ALTERNATIVE . ';');
- $result .= $this->textLine(' boundary="' . $this->boundary[1] . '"');
- break;
- default:
- // Catches case 'plain': and case '':
- $result .= $this->textLine('Content-Type: ' . $this->ContentType . '; charset=' . $this->CharSet);
- $ismultipart = false;
- break;
- }
- // RFC1341 part 5 says 7bit is assumed if not specified
- if (static::ENCODING_7BIT !== $this->Encoding) {
- // RFC 2045 section 6.4 says multipart MIME parts may only use 7bit, 8bit or binary CTE
- if ($ismultipart) {
- if (static::ENCODING_8BIT === $this->Encoding) {
- $result .= $this->headerLine('Content-Transfer-Encoding', static::ENCODING_8BIT);
- }
- // The only remaining alternatives are quoted-printable and base64, which are both 7bit compatible
- } else {
- $result .= $this->headerLine('Content-Transfer-Encoding', $this->Encoding);
- }
- }
-
- if ('mail' !== $this->Mailer) {
-// $result .= static::$LE;
- }
-
- return $result;
- }
-
- /**
- * Returns the whole MIME message.
- * Includes complete headers and body.
- * Only valid post preSend().
- *
- * @see PHPMailer::preSend()
- *
- * @return string
- */
- public function getSentMIMEMessage()
- {
- return rtrim($this->MIMEHeader . $this->mailHeader, "\n\r") . static::$LE . static::$LE . $this->MIMEBody;
- }
-
- /**
- * Create a unique ID to use for boundaries.
- *
- * @return string
- */
- protected function generateId()
- {
- $len = 32; //32 bytes = 256 bits
- $bytes = '';
- if (function_exists('random_bytes')) {
- try {
- $bytes = random_bytes($len);
- } catch (\Exception $e) {
- //Do nothing
- }
- } elseif (function_exists('openssl_random_pseudo_bytes')) {
- /** @noinspection CryptographicallySecureRandomnessInspection */
- $bytes = openssl_random_pseudo_bytes($len);
- }
- if ($bytes === '') {
- //We failed to produce a proper random string, so make do.
- //Use a hash to force the length to the same as the other methods
- $bytes = hash('sha256', uniqid((string) mt_rand(), true), true);
- }
-
- //We don't care about messing up base64 format here, just want a random string
- return str_replace(['=', '+', '/'], '', base64_encode(hash('sha256', $bytes, true)));
- }
-
- /**
- * Assemble the message body.
- * Returns an empty string on failure.
- *
- * @throws Exception
- *
- * @return string The assembled message body
- */
- public function createBody()
- {
- $body = '';
- //Create unique IDs and preset boundaries
- $this->uniqueid = $this->generateId();
- $this->boundary[1] = 'b1_' . $this->uniqueid;
- $this->boundary[2] = 'b2_' . $this->uniqueid;
- $this->boundary[3] = 'b3_' . $this->uniqueid;
-
- if ($this->sign_key_file) {
- $body .= $this->getMailMIME() . static::$LE;
- }
-
- $this->setWordWrap();
-
- $bodyEncoding = $this->Encoding;
- $bodyCharSet = $this->CharSet;
- //Can we do a 7-bit downgrade?
- if (static::ENCODING_8BIT === $bodyEncoding && !$this->has8bitChars($this->Body)) {
- $bodyEncoding = static::ENCODING_7BIT;
- //All ISO 8859, Windows codepage and UTF-8 charsets are ascii compatible up to 7-bit
- $bodyCharSet = static::CHARSET_ASCII;
- }
- //If lines are too long, and we're not already using an encoding that will shorten them,
- //change to quoted-printable transfer encoding for the body part only
- if (static::ENCODING_BASE64 !== $this->Encoding && static::hasLineLongerThanMax($this->Body)) {
- $bodyEncoding = static::ENCODING_QUOTED_PRINTABLE;
- }
-
- $altBodyEncoding = $this->Encoding;
- $altBodyCharSet = $this->CharSet;
- //Can we do a 7-bit downgrade?
- if (static::ENCODING_8BIT === $altBodyEncoding && !$this->has8bitChars($this->AltBody)) {
- $altBodyEncoding = static::ENCODING_7BIT;
- //All ISO 8859, Windows codepage and UTF-8 charsets are ascii compatible up to 7-bit
- $altBodyCharSet = static::CHARSET_ASCII;
- }
- //If lines are too long, and we're not already using an encoding that will shorten them,
- //change to quoted-printable transfer encoding for the alt body part only
- if (static::ENCODING_BASE64 !== $altBodyEncoding && static::hasLineLongerThanMax($this->AltBody)) {
- $altBodyEncoding = static::ENCODING_QUOTED_PRINTABLE;
- }
- //Use this as a preamble in all multipart message types
- $mimepre = 'This is a multi-part message in MIME format.' . static::$LE;
- switch ($this->message_type) {
- case 'inline':
- $body .= $mimepre;
- $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, '', $bodyEncoding);
- $body .= $this->encodeString($this->Body, $bodyEncoding);
- $body .= static::$LE;
- $body .= $this->attachAll('inline', $this->boundary[1]);
- break;
- case 'attach':
- $body .= $mimepre;
- $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, '', $bodyEncoding);
- $body .= $this->encodeString($this->Body, $bodyEncoding);
- $body .= static::$LE;
- $body .= $this->attachAll('attachment', $this->boundary[1]);
- break;
- case 'inline_attach':
- $body .= $mimepre;
- $body .= $this->textLine('--' . $this->boundary[1]);
- $body .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_RELATED . ';');
- $body .= $this->textLine(' boundary="' . $this->boundary[2] . '";');
- $body .= $this->textLine(' type="' . static::CONTENT_TYPE_TEXT_HTML . '"');
- $body .= static::$LE;
- $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, '', $bodyEncoding);
- $body .= $this->encodeString($this->Body, $bodyEncoding);
- $body .= static::$LE;
- $body .= $this->attachAll('inline', $this->boundary[2]);
- $body .= static::$LE;
- $body .= $this->attachAll('attachment', $this->boundary[1]);
- break;
- case 'alt':
- $body .= $mimepre;
- $body .= $this->getBoundary(
- $this->boundary[1],
- $altBodyCharSet,
- static::CONTENT_TYPE_PLAINTEXT,
- $altBodyEncoding
- );
- $body .= $this->encodeString($this->AltBody, $altBodyEncoding);
- $body .= static::$LE;
- $body .= $this->getBoundary(
- $this->boundary[1],
- $bodyCharSet,
- static::CONTENT_TYPE_TEXT_HTML,
- $bodyEncoding
- );
- $body .= $this->encodeString($this->Body, $bodyEncoding);
- $body .= static::$LE;
- if (!empty($this->Ical)) {
- $method = static::ICAL_METHOD_REQUEST;
- foreach (static::$IcalMethods as $imethod) {
- if (stripos($this->Ical, 'METHOD:' . $imethod) !== false) {
- $method = $imethod;
- break;
- }
- }
- $body .= $this->getBoundary(
- $this->boundary[1],
- '',
- static::CONTENT_TYPE_TEXT_CALENDAR . '; method=' . $method,
- ''
- );
- $body .= $this->encodeString($this->Ical, $this->Encoding);
- $body .= static::$LE;
- }
- $body .= $this->endBoundary($this->boundary[1]);
- break;
- case 'alt_inline':
- $body .= $mimepre;
- $body .= $this->getBoundary(
- $this->boundary[1],
- $altBodyCharSet,
- static::CONTENT_TYPE_PLAINTEXT,
- $altBodyEncoding
- );
- $body .= $this->encodeString($this->AltBody, $altBodyEncoding);
- $body .= static::$LE;
- $body .= $this->textLine('--' . $this->boundary[1]);
- $body .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_RELATED . ';');
- $body .= $this->textLine(' boundary="' . $this->boundary[2] . '";');
- $body .= $this->textLine(' type="' . static::CONTENT_TYPE_TEXT_HTML . '"');
- $body .= static::$LE;
- $body .= $this->getBoundary(
- $this->boundary[2],
- $bodyCharSet,
- static::CONTENT_TYPE_TEXT_HTML,
- $bodyEncoding
- );
- $body .= $this->encodeString($this->Body, $bodyEncoding);
- $body .= static::$LE;
- $body .= $this->attachAll('inline', $this->boundary[2]);
- $body .= static::$LE;
- $body .= $this->endBoundary($this->boundary[1]);
- break;
- case 'alt_attach':
- $body .= $mimepre;
- $body .= $this->textLine('--' . $this->boundary[1]);
- $body .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_ALTERNATIVE . ';');
- $body .= $this->textLine(' boundary="' . $this->boundary[2] . '"');
- $body .= static::$LE;
- $body .= $this->getBoundary(
- $this->boundary[2],
- $altBodyCharSet,
- static::CONTENT_TYPE_PLAINTEXT,
- $altBodyEncoding
- );
- $body .= $this->encodeString($this->AltBody, $altBodyEncoding);
- $body .= static::$LE;
- $body .= $this->getBoundary(
- $this->boundary[2],
- $bodyCharSet,
- static::CONTENT_TYPE_TEXT_HTML,
- $bodyEncoding
- );
- $body .= $this->encodeString($this->Body, $bodyEncoding);
- $body .= static::$LE;
- if (!empty($this->Ical)) {
- $method = static::ICAL_METHOD_REQUEST;
- foreach (static::$IcalMethods as $imethod) {
- if (stripos($this->Ical, 'METHOD:' . $imethod) !== false) {
- $method = $imethod;
- break;
- }
- }
- $body .= $this->getBoundary(
- $this->boundary[2],
- '',
- static::CONTENT_TYPE_TEXT_CALENDAR . '; method=' . $method,
- ''
- );
- $body .= $this->encodeString($this->Ical, $this->Encoding);
- }
- $body .= $this->endBoundary($this->boundary[2]);
- $body .= static::$LE;
- $body .= $this->attachAll('attachment', $this->boundary[1]);
- break;
- case 'alt_inline_attach':
- $body .= $mimepre;
- $body .= $this->textLine('--' . $this->boundary[1]);
- $body .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_ALTERNATIVE . ';');
- $body .= $this->textLine(' boundary="' . $this->boundary[2] . '"');
- $body .= static::$LE;
- $body .= $this->getBoundary(
- $this->boundary[2],
- $altBodyCharSet,
- static::CONTENT_TYPE_PLAINTEXT,
- $altBodyEncoding
- );
- $body .= $this->encodeString($this->AltBody, $altBodyEncoding);
- $body .= static::$LE;
- $body .= $this->textLine('--' . $this->boundary[2]);
- $body .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_RELATED . ';');
- $body .= $this->textLine(' boundary="' . $this->boundary[3] . '";');
- $body .= $this->textLine(' type="' . static::CONTENT_TYPE_TEXT_HTML . '"');
- $body .= static::$LE;
- $body .= $this->getBoundary(
- $this->boundary[3],
- $bodyCharSet,
- static::CONTENT_TYPE_TEXT_HTML,
- $bodyEncoding
- );
- $body .= $this->encodeString($this->Body, $bodyEncoding);
- $body .= static::$LE;
- $body .= $this->attachAll('inline', $this->boundary[3]);
- $body .= static::$LE;
- $body .= $this->endBoundary($this->boundary[2]);
- $body .= static::$LE;
- $body .= $this->attachAll('attachment', $this->boundary[1]);
- break;
- default:
- // Catch case 'plain' and case '', applies to simple `text/plain` and `text/html` body content types
- //Reset the `Encoding` property in case we changed it for line length reasons
- $this->Encoding = $bodyEncoding;
- $body .= $this->encodeString($this->Body, $this->Encoding);
- break;
- }
-
- if ($this->isError()) {
- $body = '';
- if ($this->exceptions) {
- throw new Exception($this->lang('empty_message'), self::STOP_CRITICAL);
- }
- } elseif ($this->sign_key_file) {
- try {
- if (!defined('PKCS7_TEXT')) {
- throw new Exception($this->lang('extension_missing') . 'openssl');
- }
-
- $file = tempnam(sys_get_temp_dir(), 'srcsign');
- $signed = tempnam(sys_get_temp_dir(), 'mailsign');
- file_put_contents($file, $body);
-
- //Workaround for PHP bug https://bugs.php.net/bug.php?id=69197
- if (empty($this->sign_extracerts_file)) {
- $sign = @openssl_pkcs7_sign(
- $file,
- $signed,
- 'file://' . realpath($this->sign_cert_file),
- ['file://' . realpath($this->sign_key_file), $this->sign_key_pass],
- []
- );
- } else {
- $sign = @openssl_pkcs7_sign(
- $file,
- $signed,
- 'file://' . realpath($this->sign_cert_file),
- ['file://' . realpath($this->sign_key_file), $this->sign_key_pass],
- [],
- PKCS7_DETACHED,
- $this->sign_extracerts_file
- );
- }
-
- @unlink($file);
- if ($sign) {
- $body = file_get_contents($signed);
- @unlink($signed);
- //The message returned by openssl contains both headers and body, so need to split them up
- $parts = explode("\n\n", $body, 2);
- $this->MIMEHeader .= $parts[0] . static::$LE . static::$LE;
- $body = $parts[1];
- } else {
- @unlink($signed);
- throw new Exception($this->lang('signing') . openssl_error_string());
- }
- } catch (Exception $exc) {
- $body = '';
- if ($this->exceptions) {
- throw $exc;
- }
- }
- }
-
- return $body;
- }
-
- /**
- * Return the start of a message boundary.
- *
- * @param string $boundary
- * @param string $charSet
- * @param string $contentType
- * @param string $encoding
- *
- * @return string
- */
- protected function getBoundary($boundary, $charSet, $contentType, $encoding)
- {
- $result = '';
- if ('' === $charSet) {
- $charSet = $this->CharSet;
- }
- if ('' === $contentType) {
- $contentType = $this->ContentType;
- }
- if ('' === $encoding) {
- $encoding = $this->Encoding;
- }
- $result .= $this->textLine('--' . $boundary);
- $result .= sprintf('Content-Type: %s; charset=%s', $contentType, $charSet);
- $result .= static::$LE;
- // RFC1341 part 5 says 7bit is assumed if not specified
- if (static::ENCODING_7BIT !== $encoding) {
- $result .= $this->headerLine('Content-Transfer-Encoding', $encoding);
- }
- $result .= static::$LE;
-
- return $result;
- }
-
- /**
- * Return the end of a message boundary.
- *
- * @param string $boundary
- *
- * @return string
- */
- protected function endBoundary($boundary)
- {
- return static::$LE . '--' . $boundary . '--' . static::$LE;
- }
-
- /**
- * Set the message type.
- * PHPMailer only supports some preset message types, not arbitrary MIME structures.
- */
- protected function setMessageType()
- {
- $type = [];
- if ($this->alternativeExists()) {
- $type[] = 'alt';
- }
- if ($this->inlineImageExists()) {
- $type[] = 'inline';
- }
- if ($this->attachmentExists()) {
- $type[] = 'attach';
- }
- $this->message_type = implode('_', $type);
- if ('' === $this->message_type) {
- //The 'plain' message_type refers to the message having a single body element, not that it is plain-text
- $this->message_type = 'plain';
- }
- }
-
- /**
- * Format a header line.
- *
- * @param string $name
- * @param string|int $value
- *
- * @return string
- */
- public function headerLine($name, $value)
- {
- return $name . ': ' . $value . static::$LE;
- }
-
- /**
- * Return a formatted mail line.
- *
- * @param string $value
- *
- * @return string
- */
- public function textLine($value)
- {
- return $value . static::$LE;
- }
-
- /**
- * Add an attachment from a path on the filesystem.
- * Never use a user-supplied path to a file!
- * Returns false if the file could not be found or read.
- * Explicitly *does not* support passing URLs; PHPMailer is not an HTTP client.
- * If you need to do that, fetch the resource yourself and pass it in via a local file or string.
- *
- * @param string $path Path to the attachment
- * @param string $name Overrides the attachment name
- * @param string $encoding File encoding (see $Encoding)
- * @param string $type File extension (MIME) type
- * @param string $disposition Disposition to use
- *
- * @throws Exception
- *
- * @return bool
- */
- public function addAttachment(
- $path,
- $name = '',
- $encoding = self::ENCODING_BASE64,
- $type = '',
- $disposition = 'attachment'
- ) {
- try {
- if (!static::isPermittedPath($path) || !@is_file($path)) {
- throw new Exception($this->lang('file_access') . $path, self::STOP_CONTINUE);
- }
-
- // If a MIME type is not specified, try to work it out from the file name
- if ('' === $type) {
- $type = static::filenameToType($path);
- }
-
- $filename = (string) static::mb_pathinfo($path, PATHINFO_BASENAME);
- if ('' === $name) {
- $name = $filename;
- }
-
- if (!$this->validateEncoding($encoding)) {
- throw new Exception($this->lang('encoding') . $encoding);
- }
-
- $this->attachment[] = [
- 0 => $path,
- 1 => $filename,
- 2 => $name,
- 3 => $encoding,
- 4 => $type,
- 5 => false, // isStringAttachment
- 6 => $disposition,
- 7 => $name,
- ];
- } catch (Exception $exc) {
- $this->setError($exc->getMessage());
- $this->edebug($exc->getMessage());
- if ($this->exceptions) {
- throw $exc;
- }
-
- return false;
- }
-
- return true;
- }
-
- /**
- * Return the array of attachments.
- *
- * @return array
- */
- public function getAttachments()
- {
- return $this->attachment;
- }
-
- /**
- * Attach all file, string, and binary attachments to the message.
- * Returns an empty string on failure.
- *
- * @param string $disposition_type
- * @param string $boundary
- *
- * @throws Exception
- *
- * @return string
- */
- protected function attachAll($disposition_type, $boundary)
- {
- // Return text of body
- $mime = [];
- $cidUniq = [];
- $incl = [];
-
- // Add all attachments
- foreach ($this->attachment as $attachment) {
- // Check if it is a valid disposition_filter
- if ($attachment[6] === $disposition_type) {
- // Check for string attachment
- $string = '';
- $path = '';
- $bString = $attachment[5];
- if ($bString) {
- $string = $attachment[0];
- } else {
- $path = $attachment[0];
- }
-
- $inclhash = hash('sha256', serialize($attachment));
- if (in_array($inclhash, $incl, true)) {
- continue;
- }
- $incl[] = $inclhash;
- $name = $attachment[2];
- $encoding = $attachment[3];
- $type = $attachment[4];
- $disposition = $attachment[6];
- $cid = $attachment[7];
- if ('inline' === $disposition && array_key_exists($cid, $cidUniq)) {
- continue;
- }
- $cidUniq[$cid] = true;
-
- $mime[] = sprintf('--%s%s', $boundary, static::$LE);
- //Only include a filename property if we have one
- if (!empty($name)) {
- $mime[] = sprintf(
- 'Content-Type: %s; name="%s"%s',
- $type,
- $this->encodeHeader($this->secureHeader($name)),
- static::$LE
- );
- } else {
- $mime[] = sprintf(
- 'Content-Type: %s%s',
- $type,
- static::$LE
- );
- }
- // RFC1341 part 5 says 7bit is assumed if not specified
- if (static::ENCODING_7BIT !== $encoding) {
- $mime[] = sprintf('Content-Transfer-Encoding: %s%s', $encoding, static::$LE);
- }
-
- //Only set Content-IDs on inline attachments
- if ((string) $cid !== '' && $disposition === 'inline') {
- $mime[] = 'Content-ID: <' . $this->encodeHeader($this->secureHeader($cid)) . '>' . static::$LE;
- }
-
- // If a filename contains any of these chars, it should be quoted,
- // but not otherwise: RFC2183 & RFC2045 5.1
- // Fixes a warning in IETF's msglint MIME checker
- // Allow for bypassing the Content-Disposition header totally
- if (!empty($disposition)) {
- $encoded_name = $this->encodeHeader($this->secureHeader($name));
- if (preg_match('/[ ()<>@,;:"\/\[\]?=]/', $encoded_name)) {
- $mime[] = sprintf(
- 'Content-Disposition: %s; filename="%s"%s',
- $disposition,
- $encoded_name,
- static::$LE . static::$LE
- );
- } elseif (!empty($encoded_name)) {
- $mime[] = sprintf(
- 'Content-Disposition: %s; filename=%s%s',
- $disposition,
- $encoded_name,
- static::$LE . static::$LE
- );
- } else {
- $mime[] = sprintf(
- 'Content-Disposition: %s%s',
- $disposition,
- static::$LE . static::$LE
- );
- }
- } else {
- $mime[] = static::$LE;
- }
-
- // Encode as string attachment
- if ($bString) {
- $mime[] = $this->encodeString($string, $encoding);
- } else {
- $mime[] = $this->encodeFile($path, $encoding);
- }
- if ($this->isError()) {
- return '';
- }
- $mime[] = static::$LE;
- }
- }
-
- $mime[] = sprintf('--%s--%s', $boundary, static::$LE);
-
- return implode('', $mime);
- }
-
- /**
- * Encode a file attachment in requested format.
- * Returns an empty string on failure.
- *
- * @param string $path The full path to the file
- * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable'
- *
- * @return string
- */
- protected function encodeFile($path, $encoding = self::ENCODING_BASE64)
- {
- try {
- if (!static::isPermittedPath($path) || !file_exists($path)) {
- throw new Exception($this->lang('file_open') . $path, self::STOP_CONTINUE);
- }
- $file_buffer = file_get_contents($path);
- if (false === $file_buffer) {
- throw new Exception($this->lang('file_open') . $path, self::STOP_CONTINUE);
- }
- $file_buffer = $this->encodeString($file_buffer, $encoding);
-
- return $file_buffer;
- } catch (Exception $exc) {
- $this->setError($exc->getMessage());
-
- return '';
- }
- }
-
- /**
- * Encode a string in requested format.
- * Returns an empty string on failure.
- *
- * @param string $str The text to encode
- * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable'
- *
- * @throws Exception
- *
- * @return string
- */
- public function encodeString($str, $encoding = self::ENCODING_BASE64)
- {
- $encoded = '';
- switch (strtolower($encoding)) {
- case static::ENCODING_BASE64:
- $encoded = chunk_split(
- base64_encode($str),
- static::STD_LINE_LENGTH,
- static::$LE
- );
- break;
- case static::ENCODING_7BIT:
- case static::ENCODING_8BIT:
- $encoded = static::normalizeBreaks($str);
- // Make sure it ends with a line break
- if (substr($encoded, -(strlen(static::$LE))) !== static::$LE) {
- $encoded .= static::$LE;
- }
- break;
- case static::ENCODING_BINARY:
- $encoded = $str;
- break;
- case static::ENCODING_QUOTED_PRINTABLE:
- $encoded = $this->encodeQP($str);
- break;
- default:
- $this->setError($this->lang('encoding') . $encoding);
- if ($this->exceptions) {
- throw new Exception($this->lang('encoding') . $encoding);
- }
- break;
- }
-
- return $encoded;
- }
-
- /**
- * Encode a header value (not including its label) optimally.
- * Picks shortest of Q, B, or none. Result includes folding if needed.
- * See RFC822 definitions for phrase, comment and text positions.
- *
- * @param string $str The header value to encode
- * @param string $position What context the string will be used in
- *
- * @return string
- */
- public function encodeHeader($str, $position = 'text')
- {
- $matchcount = 0;
- switch (strtolower($position)) {
- case 'phrase':
- if (!preg_match('/[\200-\377]/', $str)) {
- // Can't use addslashes as we don't know the value of magic_quotes_sybase
- $encoded = addcslashes($str, "\0..\37\177\\\"");
- if (($str === $encoded) && !preg_match('/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str)) {
- return $encoded;
- }
-
- return "\"$encoded\"";
- }
- $matchcount = preg_match_all('/[^\040\041\043-\133\135-\176]/', $str, $matches);
- break;
- /* @noinspection PhpMissingBreakStatementInspection */
- case 'comment':
- $matchcount = preg_match_all('/[()"]/', $str, $matches);
- //fallthrough
- case 'text':
- default:
- $matchcount += preg_match_all('/[\000-\010\013\014\016-\037\177-\377]/', $str, $matches);
- break;
- }
-
- if ($this->has8bitChars($str)) {
- $charset = $this->CharSet;
- } else {
- $charset = static::CHARSET_ASCII;
- }
-
- // Q/B encoding adds 8 chars and the charset ("` =??[QB]??=`").
- $overhead = 8 + strlen($charset);
-
- if ('mail' === $this->Mailer) {
- $maxlen = static::MAIL_MAX_LINE_LENGTH - $overhead;
- } else {
- $maxlen = static::STD_LINE_LENGTH - $overhead;
- }
-
- // Select the encoding that produces the shortest output and/or prevents corruption.
- if ($matchcount > strlen($str) / 3) {
- // More than 1/3 of the content needs encoding, use B-encode.
- $encoding = 'B';
- } elseif ($matchcount > 0) {
- // Less than 1/3 of the content needs encoding, use Q-encode.
- $encoding = 'Q';
- } elseif (strlen($str) > $maxlen) {
- // No encoding needed, but value exceeds max line length, use Q-encode to prevent corruption.
- $encoding = 'Q';
- } else {
- // No reformatting needed
- $encoding = false;
- }
-
- switch ($encoding) {
- case 'B':
- if ($this->hasMultiBytes($str)) {
- // Use a custom function which correctly encodes and wraps long
- // multibyte strings without breaking lines within a character
- $encoded = $this->base64EncodeWrapMB($str, "\n");
- } else {
- $encoded = base64_encode($str);
- $maxlen -= $maxlen % 4;
- $encoded = trim(chunk_split($encoded, $maxlen, "\n"));
- }
- $encoded = preg_replace('/^(.*)$/m', ' =?' . $charset . "?$encoding?\\1?=", $encoded);
- break;
- case 'Q':
- $encoded = $this->encodeQ($str, $position);
- $encoded = $this->wrapText($encoded, $maxlen, true);
- $encoded = str_replace('=' . static::$LE, "\n", trim($encoded));
- $encoded = preg_replace('/^(.*)$/m', ' =?' . $charset . "?$encoding?\\1?=", $encoded);
- break;
- default:
- return $str;
- }
-
- return trim(static::normalizeBreaks($encoded));
- }
-
- /**
- * Check if a string contains multi-byte characters.
- *
- * @param string $str multi-byte text to wrap encode
- *
- * @return bool
- */
- public function hasMultiBytes($str)
- {
- if (function_exists('mb_strlen')) {
- return strlen($str) > mb_strlen($str, $this->CharSet);
- }
-
- // Assume no multibytes (we can't handle without mbstring functions anyway)
- return false;
- }
-
- /**
- * Does a string contain any 8-bit chars (in any charset)?
- *
- * @param string $text
- *
- * @return bool
- */
- public function has8bitChars($text)
- {
- return (bool) preg_match('/[\x80-\xFF]/', $text);
- }
-
- /**
- * Encode and wrap long multibyte strings for mail headers
- * without breaking lines within a character.
- * Adapted from a function by paravoid.
- *
- * @see http://www.php.net/manual/en/function.mb-encode-mimeheader.php#60283
- *
- * @param string $str multi-byte text to wrap encode
- * @param string $linebreak string to use as linefeed/end-of-line
- *
- * @return string
- */
- public function base64EncodeWrapMB($str, $linebreak = null)
- {
- $start = '=?' . $this->CharSet . '?B?';
- $end = '?=';
- $encoded = '';
- if (null === $linebreak) {
- $linebreak = static::$LE;
- }
-
- $mb_length = mb_strlen($str, $this->CharSet);
- // Each line must have length <= 75, including $start and $end
- $length = 75 - strlen($start) - strlen($end);
- // Average multi-byte ratio
- $ratio = $mb_length / strlen($str);
- // Base64 has a 4:3 ratio
- $avgLength = floor($length * $ratio * .75);
-
- $offset = 0;
- for ($i = 0; $i < $mb_length; $i += $offset) {
- $lookBack = 0;
- do {
- $offset = $avgLength - $lookBack;
- $chunk = mb_substr($str, $i, $offset, $this->CharSet);
- $chunk = base64_encode($chunk);
- ++$lookBack;
- } while (strlen($chunk) > $length);
- $encoded .= $chunk . $linebreak;
- }
-
- // Chomp the last linefeed
- return substr($encoded, 0, -strlen($linebreak));
- }
-
- /**
- * Encode a string in quoted-printable format.
- * According to RFC2045 section 6.7.
- *
- * @param string $string The text to encode
- *
- * @return string
- */
- public function encodeQP($string)
- {
- return static::normalizeBreaks(quoted_printable_encode($string));
- }
-
- /**
- * Encode a string using Q encoding.
- *
- * @see http://tools.ietf.org/html/rfc2047#section-4.2
- *
- * @param string $str the text to encode
- * @param string $position Where the text is going to be used, see the RFC for what that means
- *
- * @return string
- */
- public function encodeQ($str, $position = 'text')
- {
- // There should not be any EOL in the string
- $pattern = '';
- $encoded = str_replace(["\r", "\n"], '', $str);
- switch (strtolower($position)) {
- case 'phrase':
- // RFC 2047 section 5.3
- $pattern = '^A-Za-z0-9!*+\/ -';
- break;
- /*
- * RFC 2047 section 5.2.
- * Build $pattern without including delimiters and []
- */
- /* @noinspection PhpMissingBreakStatementInspection */
- case 'comment':
- $pattern = '\(\)"';
- /* Intentional fall through */
- case 'text':
- default:
- // RFC 2047 section 5.1
- // Replace every high ascii, control, =, ? and _ characters
- $pattern = '\000-\011\013\014\016-\037\075\077\137\177-\377' . $pattern;
- break;
- }
- $matches = [];
- if (preg_match_all("/[{$pattern}]/", $encoded, $matches)) {
- // If the string contains an '=', make sure it's the first thing we replace
- // so as to avoid double-encoding
- $eqkey = array_search('=', $matches[0], true);
- if (false !== $eqkey) {
- unset($matches[0][$eqkey]);
- array_unshift($matches[0], '=');
- }
- foreach (array_unique($matches[0]) as $char) {
- $encoded = str_replace($char, '=' . sprintf('%02X', ord($char)), $encoded);
- }
- }
- // Replace spaces with _ (more readable than =20)
- // RFC 2047 section 4.2(2)
- return str_replace(' ', '_', $encoded);
- }
-
- /**
- * Add a string or binary attachment (non-filesystem).
- * This method can be used to attach ascii or binary data,
- * such as a BLOB record from a database.
- *
- * @param string $string String attachment data
- * @param string $filename Name of the attachment
- * @param string $encoding File encoding (see $Encoding)
- * @param string $type File extension (MIME) type
- * @param string $disposition Disposition to use
- *
- * @throws Exception
- *
- * @return bool True on successfully adding an attachment
- */
- public function addStringAttachment(
- $string,
- $filename,
- $encoding = self::ENCODING_BASE64,
- $type = '',
- $disposition = 'attachment'
- ) {
- try {
- // If a MIME type is not specified, try to work it out from the file name
- if ('' === $type) {
- $type = static::filenameToType($filename);
- }
-
- if (!$this->validateEncoding($encoding)) {
- throw new Exception($this->lang('encoding') . $encoding);
- }
-
- // Append to $attachment array
- $this->attachment[] = [
- 0 => $string,
- 1 => $filename,
- 2 => static::mb_pathinfo($filename, PATHINFO_BASENAME),
- 3 => $encoding,
- 4 => $type,
- 5 => true, // isStringAttachment
- 6 => $disposition,
- 7 => 0,
- ];
- } catch (Exception $exc) {
- $this->setError($exc->getMessage());
- $this->edebug($exc->getMessage());
- if ($this->exceptions) {
- throw $exc;
- }
-
- return false;
- }
-
- return true;
- }
-
- /**
- * Add an embedded (inline) attachment from a file.
- * This can include images, sounds, and just about any other document type.
- * These differ from 'regular' attachments in that they are intended to be
- * displayed inline with the message, not just attached for download.
- * This is used in HTML messages that embed the images
- * the HTML refers to using the $cid value.
- * Never use a user-supplied path to a file!
- *
- * @param string $path Path to the attachment
- * @param string $cid Content ID of the attachment; Use this to reference
- * the content when using an embedded image in HTML
- * @param string $name Overrides the attachment name
- * @param string $encoding File encoding (see $Encoding)
- * @param string $type File MIME type
- * @param string $disposition Disposition to use
- *
- * @throws Exception
- *
- * @return bool True on successfully adding an attachment
- */
- public function addEmbeddedImage(
- $path,
- $cid,
- $name = '',
- $encoding = self::ENCODING_BASE64,
- $type = '',
- $disposition = 'inline'
- ) {
- try {
- if (!static::isPermittedPath($path) || !@is_file($path)) {
- throw new Exception($this->lang('file_access') . $path, self::STOP_CONTINUE);
- }
-
- // If a MIME type is not specified, try to work it out from the file name
- if ('' === $type) {
- $type = static::filenameToType($path);
- }
-
- if (!$this->validateEncoding($encoding)) {
- throw new Exception($this->lang('encoding') . $encoding);
- }
-
- $filename = (string) static::mb_pathinfo($path, PATHINFO_BASENAME);
- if ('' === $name) {
- $name = $filename;
- }
-
- // Append to $attachment array
- $this->attachment[] = [
- 0 => $path,
- 1 => $filename,
- 2 => $name,
- 3 => $encoding,
- 4 => $type,
- 5 => false, // isStringAttachment
- 6 => $disposition,
- 7 => $cid,
- ];
- } catch (Exception $exc) {
- $this->setError($exc->getMessage());
- $this->edebug($exc->getMessage());
- if ($this->exceptions) {
- throw $exc;
- }
-
- return false;
- }
-
- return true;
- }
-
- /**
- * Add an embedded stringified attachment.
- * This can include images, sounds, and just about any other document type.
- * If your filename doesn't contain an extension, be sure to set the $type to an appropriate MIME type.
- *
- * @param string $string The attachment binary data
- * @param string $cid Content ID of the attachment; Use this to reference
- * the content when using an embedded image in HTML
- * @param string $name A filename for the attachment. If this contains an extension,
- * PHPMailer will attempt to set a MIME type for the attachment.
- * For example 'file.jpg' would get an 'image/jpeg' MIME type.
- * @param string $encoding File encoding (see $Encoding), defaults to 'base64'
- * @param string $type MIME type - will be used in preference to any automatically derived type
- * @param string $disposition Disposition to use
- *
- * @throws Exception
- *
- * @return bool True on successfully adding an attachment
- */
- public function addStringEmbeddedImage(
- $string,
- $cid,
- $name = '',
- $encoding = self::ENCODING_BASE64,
- $type = '',
- $disposition = 'inline'
- ) {
- try {
- // If a MIME type is not specified, try to work it out from the name
- if ('' === $type && !empty($name)) {
- $type = static::filenameToType($name);
- }
-
- if (!$this->validateEncoding($encoding)) {
- throw new Exception($this->lang('encoding') . $encoding);
- }
-
- // Append to $attachment array
- $this->attachment[] = [
- 0 => $string,
- 1 => $name,
- 2 => $name,
- 3 => $encoding,
- 4 => $type,
- 5 => true, // isStringAttachment
- 6 => $disposition,
- 7 => $cid,
- ];
- } catch (Exception $exc) {
- $this->setError($exc->getMessage());
- $this->edebug($exc->getMessage());
- if ($this->exceptions) {
- throw $exc;
- }
-
- return false;
- }
-
- return true;
- }
-
- /**
- * Validate encodings.
- *
- * @param string $encoding
- *
- * @return bool
- */
- protected function validateEncoding($encoding)
- {
- return in_array(
- $encoding,
- [
- self::ENCODING_7BIT,
- self::ENCODING_QUOTED_PRINTABLE,
- self::ENCODING_BASE64,
- self::ENCODING_8BIT,
- self::ENCODING_BINARY,
- ],
- true
- );
- }
-
- /**
- * Check if an embedded attachment is present with this cid.
- *
- * @param string $cid
- *
- * @return bool
- */
- protected function cidExists($cid)
- {
- foreach ($this->attachment as $attachment) {
- if ('inline' === $attachment[6] && $cid === $attachment[7]) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * Check if an inline attachment is present.
- *
- * @return bool
- */
- public function inlineImageExists()
- {
- foreach ($this->attachment as $attachment) {
- if ('inline' === $attachment[6]) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * Check if an attachment (non-inline) is present.
- *
- * @return bool
- */
- public function attachmentExists()
- {
- foreach ($this->attachment as $attachment) {
- if ('attachment' === $attachment[6]) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * Check if this message has an alternative body set.
- *
- * @return bool
- */
- public function alternativeExists()
- {
- return !empty($this->AltBody);
- }
-
- /**
- * Clear queued addresses of given kind.
- *
- * @param string $kind 'to', 'cc', or 'bcc'
- */
- public function clearQueuedAddresses($kind)
- {
- $this->RecipientsQueue = array_filter(
- $this->RecipientsQueue,
- static function ($params) use ($kind) {
- return $params[0] !== $kind;
- }
- );
- }
-
- /**
- * Clear all To recipients.
- */
- public function clearAddresses()
- {
- foreach ($this->to as $to) {
- unset($this->all_recipients[strtolower($to[0])]);
- }
- $this->to = [];
- $this->clearQueuedAddresses('to');
- }
-
- /**
- * Clear all CC recipients.
- */
- public function clearCCs()
- {
- foreach ($this->cc as $cc) {
- unset($this->all_recipients[strtolower($cc[0])]);
- }
- $this->cc = [];
- $this->clearQueuedAddresses('cc');
- }
-
- /**
- * Clear all BCC recipients.
- */
- public function clearBCCs()
- {
- foreach ($this->bcc as $bcc) {
- unset($this->all_recipients[strtolower($bcc[0])]);
- }
- $this->bcc = [];
- $this->clearQueuedAddresses('bcc');
- }
-
- /**
- * Clear all ReplyTo recipients.
- */
- public function clearReplyTos()
- {
- $this->ReplyTo = [];
- $this->ReplyToQueue = [];
- }
-
- /**
- * Clear all recipient types.
- */
- public function clearAllRecipients()
- {
- $this->to = [];
- $this->cc = [];
- $this->bcc = [];
- $this->all_recipients = [];
- $this->RecipientsQueue = [];
- }
-
- /**
- * Clear all filesystem, string, and binary attachments.
- */
- public function clearAttachments()
- {
- $this->attachment = [];
- }
-
- /**
- * Clear all custom headers.
- */
- public function clearCustomHeaders()
- {
- $this->CustomHeader = [];
- }
-
- /**
- * Add an error message to the error container.
- *
- * @param string $msg
- */
- protected function setError($msg)
- {
- ++$this->error_count;
- if ('smtp' === $this->Mailer && null !== $this->smtp) {
- $lasterror = $this->smtp->getError();
- if (!empty($lasterror['error'])) {
- $msg .= $this->lang('smtp_error') . $lasterror['error'];
- if (!empty($lasterror['detail'])) {
- $msg .= ' Detail: ' . $lasterror['detail'];
- }
- if (!empty($lasterror['smtp_code'])) {
- $msg .= ' SMTP code: ' . $lasterror['smtp_code'];
- }
- if (!empty($lasterror['smtp_code_ex'])) {
- $msg .= ' Additional SMTP info: ' . $lasterror['smtp_code_ex'];
- }
- }
- }
- $this->ErrorInfo = $msg;
- }
-
- /**
- * Return an RFC 822 formatted date.
- *
- * @return string
- */
- public static function rfcDate()
- {
- // Set the time zone to whatever the default is to avoid 500 errors
- // Will default to UTC if it's not set properly in php.ini
- date_default_timezone_set(@date_default_timezone_get());
-
- return date('D, j M Y H:i:s O');
- }
-
- /**
- * Get the server hostname.
- * Returns 'localhost.localdomain' if unknown.
- *
- * @return string
- */
- protected function serverHostname()
- {
- $result = '';
- if (!empty($this->Hostname)) {
- $result = $this->Hostname;
- } elseif (isset($_SERVER) && array_key_exists('SERVER_NAME', $_SERVER)) {
- $result = $_SERVER['SERVER_NAME'];
- } elseif (function_exists('gethostname') && gethostname() !== false) {
- $result = gethostname();
- } elseif (php_uname('n') !== false) {
- $result = php_uname('n');
- }
- if (!static::isValidHost($result)) {
- return 'localhost.localdomain';
- }
-
- return $result;
- }
-
- /**
- * Validate whether a string contains a valid value to use as a hostname or IP address.
- * IPv6 addresses must include [], e.g. `[::1]`, not just `::1`.
- *
- * @param string $host The host name or IP address to check
- *
- * @return bool
- */
- public static function isValidHost($host)
- {
- //Simple syntax limits
- if (empty($host)
- || !is_string($host)
- || strlen($host) > 256
- ) {
- return false;
- }
- //Looks like a bracketed IPv6 address
- if (trim($host, '[]') !== $host) {
- return (bool) filter_var(trim($host, '[]'), FILTER_VALIDATE_IP, FILTER_FLAG_IPV6);
- }
- //If removing all the dots results in a numeric string, it must be an IPv4 address.
- //Need to check this first because otherwise things like `999.0.0.0` are considered valid host names
- if (is_numeric(str_replace('.', '', $host))) {
- //Is it a valid IPv4 address?
- return (bool) filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4);
- }
- if (filter_var('http://' . $host, FILTER_VALIDATE_URL)) {
- //Is it a syntactically valid hostname?
- return true;
- }
-
- return false;
- }
-
- /**
- * Get an error message in the current language.
- *
- * @param string $key
- *
- * @return string
- */
- protected function lang($key)
- {
- if (count($this->language) < 1) {
- $this->setLanguage(); // set the default language
- }
-
- if (array_key_exists($key, $this->language)) {
- if ('smtp_connect_failed' === $key) {
- //Include a link to troubleshooting docs on SMTP connection failure
- //this is by far the biggest cause of support questions
- //but it's usually not PHPMailer's fault.
- return $this->language[$key] . ' https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting';
- }
-
- return $this->language[$key];
- }
-
- //Return the key as a fallback
- return $key;
- }
-
- /**
- * Check if an error occurred.
- *
- * @return bool True if an error did occur
- */
- public function isError()
- {
- return $this->error_count > 0;
- }
-
- /**
- * Add a custom header.
- * $name value can be overloaded to contain
- * both header name and value (name:value).
- *
- * @param string $name Custom header name
- * @param string|null $value Header value
- */
- public function addCustomHeader($name, $value = null)
- {
- if (null === $value) {
- // Value passed in as name:value
- $this->CustomHeader[] = explode(':', $name, 2);
- } else {
- $this->CustomHeader[] = [$name, $value];
- }
- }
-
- /**
- * Returns all custom headers.
- *
- * @return array
- */
- public function getCustomHeaders()
- {
- return $this->CustomHeader;
- }
-
- /**
- * Create a message body from an HTML string.
- * Automatically inlines images and creates a plain-text version by converting the HTML,
- * overwriting any existing values in Body and AltBody.
- * Do not source $message content from user input!
- * $basedir is prepended when handling relative URLs, e.g. and must not be empty
- * will look for an image file in $basedir/images/a.png and convert it to inline.
- * If you don't provide a $basedir, relative paths will be left untouched (and thus probably break in email)
- * Converts data-uri images into embedded attachments.
- * If you don't want to apply these transformations to your HTML, just set Body and AltBody directly.
- *
- * @param string $message HTML message string
- * @param string $basedir Absolute path to a base directory to prepend to relative paths to images
- * @param bool|callable $advanced Whether to use the internal HTML to text converter
- * or your own custom converter @return string $message The transformed message Body
- *
- * @throws Exception
- *
- * @see PHPMailer::html2text()
- */
- public function msgHTML($message, $basedir = '', $advanced = false)
- {
- preg_match_all('/(? 1 && '/' !== substr($basedir, -1)) {
- // Ensure $basedir has a trailing /
- $basedir .= '/';
- }
- foreach ($images[2] as $imgindex => $url) {
- // Convert data URIs into embedded images
- //e.g. "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
- if (preg_match('#^data:(image/(?:jpe?g|gif|png));?(base64)?,(.+)#', $url, $match)) {
- if (count($match) === 4 && static::ENCODING_BASE64 === $match[2]) {
- $data = base64_decode($match[3]);
- } elseif ('' === $match[2]) {
- $data = rawurldecode($match[3]);
- } else {
- //Not recognised so leave it alone
- continue;
- }
- //Hash the decoded data, not the URL, so that the same data-URI image used in multiple places
- //will only be embedded once, even if it used a different encoding
- $cid = substr(hash('sha256', $data), 0, 32) . '@phpmailer.0'; // RFC2392 S 2
-
- if (!$this->cidExists($cid)) {
- $this->addStringEmbeddedImage(
- $data,
- $cid,
- 'embed' . $imgindex,
- static::ENCODING_BASE64,
- $match[1]
- );
- }
- $message = str_replace(
- $images[0][$imgindex],
- $images[1][$imgindex] . '="cid:' . $cid . '"',
- $message
- );
- continue;
- }
- if (// Only process relative URLs if a basedir is provided (i.e. no absolute local paths)
- !empty($basedir)
- // Ignore URLs containing parent dir traversal (..)
- && (strpos($url, '..') === false)
- // Do not change urls that are already inline images
- && 0 !== strpos($url, 'cid:')
- // Do not change absolute URLs, including anonymous protocol
- && !preg_match('#^[a-z][a-z0-9+.-]*:?//#i', $url)
- ) {
- $filename = static::mb_pathinfo($url, PATHINFO_BASENAME);
- $directory = dirname($url);
- if ('.' === $directory) {
- $directory = '';
- }
- // RFC2392 S 2
- $cid = substr(hash('sha256', $url), 0, 32) . '@phpmailer.0';
- if (strlen($basedir) > 1 && '/' !== substr($basedir, -1)) {
- $basedir .= '/';
- }
- if (strlen($directory) > 1 && '/' !== substr($directory, -1)) {
- $directory .= '/';
- }
- if ($this->addEmbeddedImage(
- $basedir . $directory . $filename,
- $cid,
- $filename,
- static::ENCODING_BASE64,
- static::_mime_types((string) static::mb_pathinfo($filename, PATHINFO_EXTENSION))
- )
- ) {
- $message = preg_replace(
- '/' . $images[1][$imgindex] . '=["\']' . preg_quote($url, '/') . '["\']/Ui',
- $images[1][$imgindex] . '="cid:' . $cid . '"',
- $message
- );
- }
- }
- }
- }
- $this->isHTML();
- // Convert all message body line breaks to LE, makes quoted-printable encoding work much better
- $this->Body = static::normalizeBreaks($message);
- $this->AltBody = static::normalizeBreaks($this->html2text($message, $advanced));
- if (!$this->alternativeExists()) {
- $this->AltBody = 'This is an HTML-only message. To view it, activate HTML in your email application.'
- . static::$LE;
- }
-
- return $this->Body;
- }
-
- /**
- * Convert an HTML string into plain text.
- * This is used by msgHTML().
- * Note - older versions of this function used a bundled advanced converter
- * which was removed for license reasons in #232.
- * Example usage:
- *
- * ```php
- * // Use default conversion
- * $plain = $mail->html2text($html);
- * // Use your own custom converter
- * $plain = $mail->html2text($html, function($html) {
- * $converter = new MyHtml2text($html);
- * return $converter->get_text();
- * });
- * ```
- *
- * @param string $html The HTML text to convert
- * @param bool|callable $advanced Any boolean value to use the internal converter,
- * or provide your own callable for custom conversion
- *
- * @return string
- */
- public function html2text($html, $advanced = false)
- {
- if (is_callable($advanced)) {
- return $advanced($html);
- }
-
- return html_entity_decode(
- trim(strip_tags(preg_replace('/<(head|title|style|script)[^>]*>.*?<\/\\1>/si', '', $html))),
- ENT_QUOTES,
- $this->CharSet
- );
- }
-
- /**
- * Get the MIME type for a file extension.
- *
- * @param string $ext File extension
- *
- * @return string MIME type of file
- */
- public static function _mime_types($ext = '')
- {
- $mimes = [
- 'xl' => 'application/excel',
- 'js' => 'application/javascript',
- 'hqx' => 'application/mac-binhex40',
- 'cpt' => 'application/mac-compactpro',
- 'bin' => 'application/macbinary',
- 'doc' => 'application/msword',
- 'word' => 'application/msword',
- 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
- 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
- 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template',
- 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
- 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
- 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide',
- 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
- 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
- 'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12',
- 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12',
- 'class' => 'application/octet-stream',
- 'dll' => 'application/octet-stream',
- 'dms' => 'application/octet-stream',
- 'exe' => 'application/octet-stream',
- 'lha' => 'application/octet-stream',
- 'lzh' => 'application/octet-stream',
- 'psd' => 'application/octet-stream',
- 'sea' => 'application/octet-stream',
- 'so' => 'application/octet-stream',
- 'oda' => 'application/oda',
- 'pdf' => 'application/pdf',
- 'ai' => 'application/postscript',
- 'eps' => 'application/postscript',
- 'ps' => 'application/postscript',
- 'smi' => 'application/smil',
- 'smil' => 'application/smil',
- 'mif' => 'application/vnd.mif',
- 'xls' => 'application/vnd.ms-excel',
- 'ppt' => 'application/vnd.ms-powerpoint',
- 'wbxml' => 'application/vnd.wap.wbxml',
- 'wmlc' => 'application/vnd.wap.wmlc',
- 'dcr' => 'application/x-director',
- 'dir' => 'application/x-director',
- 'dxr' => 'application/x-director',
- 'dvi' => 'application/x-dvi',
- 'gtar' => 'application/x-gtar',
- 'php3' => 'application/x-httpd-php',
- 'php4' => 'application/x-httpd-php',
- 'php' => 'application/x-httpd-php',
- 'phtml' => 'application/x-httpd-php',
- 'phps' => 'application/x-httpd-php-source',
- 'swf' => 'application/x-shockwave-flash',
- 'sit' => 'application/x-stuffit',
- 'tar' => 'application/x-tar',
- 'tgz' => 'application/x-tar',
- 'xht' => 'application/xhtml+xml',
- 'xhtml' => 'application/xhtml+xml',
- 'zip' => 'application/zip',
- 'mid' => 'audio/midi',
- 'midi' => 'audio/midi',
- 'mp2' => 'audio/mpeg',
- 'mp3' => 'audio/mpeg',
- 'm4a' => 'audio/mp4',
- 'mpga' => 'audio/mpeg',
- 'aif' => 'audio/x-aiff',
- 'aifc' => 'audio/x-aiff',
- 'aiff' => 'audio/x-aiff',
- 'ram' => 'audio/x-pn-realaudio',
- 'rm' => 'audio/x-pn-realaudio',
- 'rpm' => 'audio/x-pn-realaudio-plugin',
- 'ra' => 'audio/x-realaudio',
- 'wav' => 'audio/x-wav',
- 'mka' => 'audio/x-matroska',
- 'bmp' => 'image/bmp',
- 'gif' => 'image/gif',
- 'jpeg' => 'image/jpeg',
- 'jpe' => 'image/jpeg',
- 'jpg' => 'image/jpeg',
- 'png' => 'image/png',
- 'tiff' => 'image/tiff',
- 'tif' => 'image/tiff',
- 'webp' => 'image/webp',
- 'heif' => 'image/heif',
- 'heifs' => 'image/heif-sequence',
- 'heic' => 'image/heic',
- 'heics' => 'image/heic-sequence',
- 'eml' => 'message/rfc822',
- 'css' => 'text/css',
- 'html' => 'text/html',
- 'htm' => 'text/html',
- 'shtml' => 'text/html',
- 'log' => 'text/plain',
- 'text' => 'text/plain',
- 'txt' => 'text/plain',
- 'rtx' => 'text/richtext',
- 'rtf' => 'text/rtf',
- 'vcf' => 'text/vcard',
- 'vcard' => 'text/vcard',
- 'ics' => 'text/calendar',
- 'xml' => 'text/xml',
- 'xsl' => 'text/xml',
- 'wmv' => 'video/x-ms-wmv',
- 'mpeg' => 'video/mpeg',
- 'mpe' => 'video/mpeg',
- 'mpg' => 'video/mpeg',
- 'mp4' => 'video/mp4',
- 'm4v' => 'video/mp4',
- 'mov' => 'video/quicktime',
- 'qt' => 'video/quicktime',
- 'rv' => 'video/vnd.rn-realvideo',
- 'avi' => 'video/x-msvideo',
- 'movie' => 'video/x-sgi-movie',
- 'webm' => 'video/webm',
- 'mkv' => 'video/x-matroska',
- ];
- $ext = strtolower($ext);
- if (array_key_exists($ext, $mimes)) {
- return $mimes[$ext];
- }
-
- return 'application/octet-stream';
- }
-
- /**
- * Map a file name to a MIME type.
- * Defaults to 'application/octet-stream', i.e.. arbitrary binary data.
- *
- * @param string $filename A file name or full path, does not need to exist as a file
- *
- * @return string
- */
- public static function filenameToType($filename)
- {
- // In case the path is a URL, strip any query string before getting extension
- $qpos = strpos($filename, '?');
- if (false !== $qpos) {
- $filename = substr($filename, 0, $qpos);
- }
- $ext = static::mb_pathinfo($filename, PATHINFO_EXTENSION);
-
- return static::_mime_types($ext);
- }
-
- /**
- * Multi-byte-safe pathinfo replacement.
- * Drop-in replacement for pathinfo(), but multibyte- and cross-platform-safe.
- *
- * @see http://www.php.net/manual/en/function.pathinfo.php#107461
- *
- * @param string $path A filename or path, does not need to exist as a file
- * @param int|string $options Either a PATHINFO_* constant,
- * or a string name to return only the specified piece
- *
- * @return string|array
- */
- public static function mb_pathinfo($path, $options = null)
- {
- $ret = ['dirname' => '', 'basename' => '', 'extension' => '', 'filename' => ''];
- $pathinfo = [];
- if (preg_match('#^(.*?)[\\\\/]*(([^/\\\\]*?)(\.([^.\\\\/]+?)|))[\\\\/.]*$#m', $path, $pathinfo)) {
- if (array_key_exists(1, $pathinfo)) {
- $ret['dirname'] = $pathinfo[1];
- }
- if (array_key_exists(2, $pathinfo)) {
- $ret['basename'] = $pathinfo[2];
- }
- if (array_key_exists(5, $pathinfo)) {
- $ret['extension'] = $pathinfo[5];
- }
- if (array_key_exists(3, $pathinfo)) {
- $ret['filename'] = $pathinfo[3];
- }
- }
- switch ($options) {
- case PATHINFO_DIRNAME:
- case 'dirname':
- return $ret['dirname'];
- case PATHINFO_BASENAME:
- case 'basename':
- return $ret['basename'];
- case PATHINFO_EXTENSION:
- case 'extension':
- return $ret['extension'];
- case PATHINFO_FILENAME:
- case 'filename':
- return $ret['filename'];
- default:
- return $ret;
- }
- }
-
- /**
- * Set or reset instance properties.
- * You should avoid this function - it's more verbose, less efficient, more error-prone and
- * harder to debug than setting properties directly.
- * Usage Example:
- * `$mail->set('SMTPSecure', static::ENCRYPTION_STARTTLS);`
- * is the same as:
- * `$mail->SMTPSecure = static::ENCRYPTION_STARTTLS;`.
- *
- * @param string $name The property name to set
- * @param mixed $value The value to set the property to
- *
- * @return bool
- */
- public function set($name, $value = '')
- {
- if (property_exists($this, $name)) {
- $this->$name = $value;
-
- return true;
- }
- $this->setError($this->lang('variable_set') . $name);
-
- return false;
- }
-
- /**
- * Strip newlines to prevent header injection.
- *
- * @param string $str
- *
- * @return string
- */
- public function secureHeader($str)
- {
- return trim(str_replace(["\r", "\n"], '', $str));
- }
-
- /**
- * Normalize line breaks in a string.
- * Converts UNIX LF, Mac CR and Windows CRLF line breaks into a single line break format.
- * Defaults to CRLF (for message bodies) and preserves consecutive breaks.
- *
- * @param string $text
- * @param string $breaktype What kind of line break to use; defaults to static::$LE
- *
- * @return string
- */
- public static function normalizeBreaks($text, $breaktype = null)
- {
- if (null === $breaktype) {
- $breaktype = static::$LE;
- }
- // Normalise to \n
- $text = str_replace(["\r\n", "\r"], "\n", $text);
- // Now convert LE as needed
- if ("\n" !== $breaktype) {
- $text = str_replace("\n", $breaktype, $text);
- }
-
- return $text;
- }
-
- /**
- * Return the current line break format string.
- *
- * @return string
- */
- public static function getLE()
- {
- return static::$LE;
- }
-
- /**
- * Set the line break format string, e.g. "\r\n".
- *
- * @param string $le
- */
- protected static function setLE($le)
- {
- static::$LE = $le;
- }
-
- /**
- * Set the public and private key files and password for S/MIME signing.
- *
- * @param string $cert_filename
- * @param string $key_filename
- * @param string $key_pass Password for private key
- * @param string $extracerts_filename Optional path to chain certificate
- */
- public function sign($cert_filename, $key_filename, $key_pass, $extracerts_filename = '')
- {
- $this->sign_cert_file = $cert_filename;
- $this->sign_key_file = $key_filename;
- $this->sign_key_pass = $key_pass;
- $this->sign_extracerts_file = $extracerts_filename;
- }
-
- /**
- * Quoted-Printable-encode a DKIM header.
- *
- * @param string $txt
- *
- * @return string
- */
- public function DKIM_QP($txt)
- {
- $line = '';
- $len = strlen($txt);
- for ($i = 0; $i < $len; ++$i) {
- $ord = ord($txt[$i]);
- if (((0x21 <= $ord) && ($ord <= 0x3A)) || $ord === 0x3C || ((0x3E <= $ord) && ($ord <= 0x7E))) {
- $line .= $txt[$i];
- } else {
- $line .= '=' . sprintf('%02X', $ord);
- }
- }
-
- return $line;
- }
-
- /**
- * Generate a DKIM signature.
- *
- * @param string $signHeader
- *
- * @throws Exception
- *
- * @return string The DKIM signature value
- */
- public function DKIM_Sign($signHeader)
- {
- if (!defined('PKCS7_TEXT')) {
- if ($this->exceptions) {
- throw new Exception($this->lang('extension_missing') . 'openssl');
- }
-
- return '';
- }
- $privKeyStr = !empty($this->DKIM_private_string) ?
- $this->DKIM_private_string :
- file_get_contents($this->DKIM_private);
- if ('' !== $this->DKIM_passphrase) {
- $privKey = openssl_pkey_get_private($privKeyStr, $this->DKIM_passphrase);
- } else {
- $privKey = openssl_pkey_get_private($privKeyStr);
- }
- if (openssl_sign($signHeader, $signature, $privKey, 'sha256WithRSAEncryption')) {
- openssl_pkey_free($privKey);
-
- return base64_encode($signature);
- }
- openssl_pkey_free($privKey);
-
- return '';
- }
-
- /**
- * Generate a DKIM canonicalization header.
- * Uses the 'relaxed' algorithm from RFC6376 section 3.4.2.
- * Canonicalized headers should *always* use CRLF, regardless of mailer setting.
- *
- * @see https://tools.ietf.org/html/rfc6376#section-3.4.2
- *
- * @param string $signHeader Header
- *
- * @return string
- */
- public function DKIM_HeaderC($signHeader)
- {
- //Note PCRE \s is too broad a definition of whitespace; RFC5322 defines it as `[ \t]`
- //@see https://tools.ietf.org/html/rfc5322#section-2.2
- //That means this may break if you do something daft like put vertical tabs in your headers.
- //Unfold header lines
- $signHeader = preg_replace('/\r\n[ \t]+/', ' ', $signHeader);
- //Break headers out into an array
- $lines = explode("\r\n", $signHeader);
- foreach ($lines as $key => $line) {
- //If the header is missing a :, skip it as it's invalid
- //This is likely to happen because the explode() above will also split
- //on the trailing LE, leaving an empty line
- if (strpos($line, ':') === false) {
- continue;
- }
- list($heading, $value) = explode(':', $line, 2);
- //Lower-case header name
- $heading = strtolower($heading);
- //Collapse white space within the value, also convert WSP to space
- $value = preg_replace('/[ \t]+/', ' ', $value);
- //RFC6376 is slightly unclear here - it says to delete space at the *end* of each value
- //But then says to delete space before and after the colon.
- //Net result is the same as trimming both ends of the value.
- //By elimination, the same applies to the field name
- $lines[$key] = trim($heading, " \t") . ':' . trim($value, " \t");
- }
-
- return implode("\r\n", $lines);
- }
-
- /**
- * Generate a DKIM canonicalization body.
- * Uses the 'simple' algorithm from RFC6376 section 3.4.3.
- * Canonicalized bodies should *always* use CRLF, regardless of mailer setting.
- *
- * @see https://tools.ietf.org/html/rfc6376#section-3.4.3
- *
- * @param string $body Message Body
- *
- * @return string
- */
- public function DKIM_BodyC($body)
- {
- if (empty($body)) {
- return "\r\n";
- }
- // Normalize line endings to CRLF
- $body = static::normalizeBreaks($body, "\r\n");
-
- //Reduce multiple trailing line breaks to a single one
- return rtrim($body, "\r\n") . "\r\n";
- }
-
- /**
- * Create the DKIM header and body in a new message header.
- *
- * @param string $headers_line Header lines
- * @param string $subject Subject
- * @param string $body Body
- *
- * @throws Exception
- *
- * @return string
- */
- public function DKIM_Add($headers_line, $subject, $body)
- {
- $DKIMsignatureType = 'rsa-sha256'; // Signature & hash algorithms
- $DKIMcanonicalization = 'relaxed/simple'; // Canonicalization methods of header & body
- $DKIMquery = 'dns/txt'; // Query method
- $DKIMtime = time();
- //Always sign these headers without being asked
- $autoSignHeaders = [
- 'From',
- 'To',
- 'CC',
- 'Date',
- 'Subject',
- 'Reply-To',
- 'Message-ID',
- 'Content-Type',
- 'Mime-Version',
- 'X-Mailer',
- ];
- if (stripos($headers_line, 'Subject') === false) {
- $headers_line .= 'Subject: ' . $subject . static::$LE;
- }
- $headerLines = explode(static::$LE, $headers_line);
- $currentHeaderLabel = '';
- $currentHeaderValue = '';
- $parsedHeaders = [];
- $headerLineIndex = 0;
- $headerLineCount = count($headerLines);
- foreach ($headerLines as $headerLine) {
- $matches = [];
- if (preg_match('/^([^ \t]*?)(?::[ \t]*)(.*)$/', $headerLine, $matches)) {
- if ($currentHeaderLabel !== '') {
- //We were previously in another header; This is the start of a new header, so save the previous one
- $parsedHeaders[] = ['label' => $currentHeaderLabel, 'value' => $currentHeaderValue];
- }
- $currentHeaderLabel = $matches[1];
- $currentHeaderValue = $matches[2];
- } elseif (preg_match('/^[ \t]+(.*)$/', $headerLine, $matches)) {
- //This is a folded continuation of the current header, so unfold it
- $currentHeaderValue .= ' ' . $matches[1];
- }
- ++$headerLineIndex;
- if ($headerLineIndex >= $headerLineCount) {
- //This was the last line, so finish off this header
- $parsedHeaders[] = ['label' => $currentHeaderLabel, 'value' => $currentHeaderValue];
- }
- }
- $copiedHeaders = [];
- $headersToSignKeys = [];
- $headersToSign = [];
- foreach ($parsedHeaders as $header) {
- //Is this header one that must be included in the DKIM signature?
- if (in_array($header['label'], $autoSignHeaders, true)) {
- $headersToSignKeys[] = $header['label'];
- $headersToSign[] = $header['label'] . ': ' . $header['value'];
- if ($this->DKIM_copyHeaderFields) {
- $copiedHeaders[] = $header['label'] . ':' . //Note no space after this, as per RFC
- str_replace('|', '=7C', $this->DKIM_QP($header['value']));
- }
- continue;
- }
- //Is this an extra custom header we've been asked to sign?
- if (in_array($header['label'], $this->DKIM_extraHeaders, true)) {
- //Find its value in custom headers
- foreach ($this->CustomHeader as $customHeader) {
- if ($customHeader[0] === $header['label']) {
- $headersToSignKeys[] = $header['label'];
- $headersToSign[] = $header['label'] . ': ' . $header['value'];
- if ($this->DKIM_copyHeaderFields) {
- $copiedHeaders[] = $header['label'] . ':' . //Note no space after this, as per RFC
- str_replace('|', '=7C', $this->DKIM_QP($header['value']));
- }
- //Skip straight to the next header
- continue 2;
- }
- }
- }
- }
- $copiedHeaderFields = '';
- if ($this->DKIM_copyHeaderFields && count($copiedHeaders) > 0) {
- //Assemble a DKIM 'z' tag
- $copiedHeaderFields = ' z=';
- $first = true;
- foreach ($copiedHeaders as $copiedHeader) {
- if (!$first) {
- $copiedHeaderFields .= static::$LE . ' |';
- }
- //Fold long values
- if (strlen($copiedHeader) > self::STD_LINE_LENGTH - 3) {
- $copiedHeaderFields .= substr(
- chunk_split($copiedHeader, self::STD_LINE_LENGTH - 3, static::$LE . ' '),
- 0,
- -strlen(static::$LE . ' ')
- );
- } else {
- $copiedHeaderFields .= $copiedHeader;
- }
- $first = false;
- }
- $copiedHeaderFields .= ';' . static::$LE;
- }
- $headerKeys = ' h=' . implode(':', $headersToSignKeys) . ';' . static::$LE;
- $headerValues = implode(static::$LE, $headersToSign);
- $body = $this->DKIM_BodyC($body);
- $DKIMlen = strlen($body); // Length of body
- $DKIMb64 = base64_encode(pack('H*', hash('sha256', $body))); // Base64 of packed binary SHA-256 hash of body
- $ident = '';
- if ('' !== $this->DKIM_identity) {
- $ident = ' i=' . $this->DKIM_identity . ';' . static::$LE;
- }
- //The DKIM-Signature header is included in the signature *except for* the value of the `b` tag
- //which is appended after calculating the signature
- //https://tools.ietf.org/html/rfc6376#section-3.5
- $dkimSignatureHeader = 'DKIM-Signature: v=1;' .
- ' d=' . $this->DKIM_domain . ';' .
- ' s=' . $this->DKIM_selector . ';' . static::$LE .
- ' a=' . $DKIMsignatureType . ';' .
- ' q=' . $DKIMquery . ';' .
- ' l=' . $DKIMlen . ';' .
- ' t=' . $DKIMtime . ';' .
- ' c=' . $DKIMcanonicalization . ';' . static::$LE .
- $headerKeys .
- $ident .
- $copiedHeaderFields .
- ' bh=' . $DKIMb64 . ';' . static::$LE .
- ' b=';
- //Canonicalize the set of headers
- $canonicalizedHeaders = $this->DKIM_HeaderC(
- $headerValues . static::$LE . $dkimSignatureHeader
- );
- $signature = $this->DKIM_Sign($canonicalizedHeaders);
- $signature = trim(chunk_split($signature, self::STD_LINE_LENGTH - 3, static::$LE . ' '));
-
- return static::normalizeBreaks($dkimSignatureHeader . $signature) . static::$LE;
- }
-
- /**
- * Detect if a string contains a line longer than the maximum line length
- * allowed by RFC 2822 section 2.1.1.
- *
- * @param string $str
- *
- * @return bool
- */
- public static function hasLineLongerThanMax($str)
- {
- return (bool) preg_match('/^(.{' . (self::MAX_LINE_LENGTH + strlen(static::$LE)) . ',})/m', $str);
- }
-
- /**
- * Allows for public read access to 'to' property.
- * Before the send() call, queued addresses (i.e. with IDN) are not yet included.
- *
- * @return array
- */
- public function getToAddresses()
- {
- return $this->to;
- }
-
- /**
- * Allows for public read access to 'cc' property.
- * Before the send() call, queued addresses (i.e. with IDN) are not yet included.
- *
- * @return array
- */
- public function getCcAddresses()
- {
- return $this->cc;
- }
-
- /**
- * Allows for public read access to 'bcc' property.
- * Before the send() call, queued addresses (i.e. with IDN) are not yet included.
- *
- * @return array
- */
- public function getBccAddresses()
- {
- return $this->bcc;
- }
-
- /**
- * Allows for public read access to 'ReplyTo' property.
- * Before the send() call, queued addresses (i.e. with IDN) are not yet included.
- *
- * @return array
- */
- public function getReplyToAddresses()
- {
- return $this->ReplyTo;
- }
-
- /**
- * Allows for public read access to 'all_recipients' property.
- * Before the send() call, queued addresses (i.e. with IDN) are not yet included.
- *
- * @return array
- */
- public function getAllRecipientAddresses()
- {
- return $this->all_recipients;
- }
-
- /**
- * Perform a callback.
- *
- * @param bool $isSent
- * @param array $to
- * @param array $cc
- * @param array $bcc
- * @param string $subject
- * @param string $body
- * @param string $from
- * @param array $extra
- */
- protected function doCallback($isSent, $to, $cc, $bcc, $subject, $body, $from, $extra)
- {
- if (!empty($this->action_function) && is_callable($this->action_function)) {
- call_user_func($this->action_function, $isSent, $to, $cc, $bcc, $subject, $body, $from, $extra);
- }
- }
-
- /**
- * Get the OAuth instance.
- *
- * @return OAuth
- */
- public function getOAuth()
- {
- return $this->oauth;
- }
-
- /**
- * Set an OAuth instance.
- */
- public function setOAuth(OAuth $oauth)
- {
- $this->oauth = $oauth;
- }
-}
diff --git a/vendor/phpmailer/phpmailer/src/POP3.php b/vendor/phpmailer/phpmailer/src/POP3.php
deleted file mode 100644
index b78bf66..0000000
--- a/vendor/phpmailer/phpmailer/src/POP3.php
+++ /dev/null
@@ -1,419 +0,0 @@
-
- * @author Jim Jagielski (jimjag)
- * @author Andy Prevost (codeworxtech)
- * @author Brent R. Matzelle (original founder)
- * @copyright 2012 - 2019 Marcus Bointon
- * @copyright 2010 - 2012 Jim Jagielski
- * @copyright 2004 - 2009 Andy Prevost
- * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
- * @note This program is distributed in the hope that it will be useful - WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-namespace PHPMailer\PHPMailer;
-
-/**
- * PHPMailer POP-Before-SMTP Authentication Class.
- * Specifically for PHPMailer to use for RFC1939 POP-before-SMTP authentication.
- * 1) This class does not support APOP authentication.
- * 2) Opening and closing lots of POP3 connections can be quite slow. If you need
- * to send a batch of emails then just perform the authentication once at the start,
- * and then loop through your mail sending script. Providing this process doesn't
- * take longer than the verification period lasts on your POP3 server, you should be fine.
- * 3) This is really ancient technology; you should only need to use it to talk to very old systems.
- * 4) This POP3 class is deliberately lightweight and incomplete, implementing just
- * enough to do authentication.
- * If you want a more complete class there are other POP3 classes for PHP available.
- *
- * @author Richard Davey (original author)
- * @author Marcus Bointon (Synchro/coolbru)
- * @author Jim Jagielski (jimjag)
- * @author Andy Prevost (codeworxtech)
- */
-class POP3
-{
- /**
- * The POP3 PHPMailer Version number.
- *
- * @var string
- */
- const VERSION = '6.1.3';
-
- /**
- * Default POP3 port number.
- *
- * @var int
- */
- const DEFAULT_PORT = 110;
-
- /**
- * Default timeout in seconds.
- *
- * @var int
- */
- const DEFAULT_TIMEOUT = 30;
-
- /**
- * Debug display level.
- * Options: 0 = no, 1+ = yes.
- *
- * @var int
- */
- public $do_debug = 0;
-
- /**
- * POP3 mail server hostname.
- *
- * @var string
- */
- public $host;
-
- /**
- * POP3 port number.
- *
- * @var int
- */
- public $port;
-
- /**
- * POP3 Timeout Value in seconds.
- *
- * @var int
- */
- public $tval;
-
- /**
- * POP3 username.
- *
- * @var string
- */
- public $username;
-
- /**
- * POP3 password.
- *
- * @var string
- */
- public $password;
-
- /**
- * Resource handle for the POP3 connection socket.
- *
- * @var resource
- */
- protected $pop_conn;
-
- /**
- * Are we connected?
- *
- * @var bool
- */
- protected $connected = false;
-
- /**
- * Error container.
- *
- * @var array
- */
- protected $errors = [];
-
- /**
- * Line break constant.
- */
- const LE = "\r\n";
-
- /**
- * Simple static wrapper for all-in-one POP before SMTP.
- *
- * @param string $host The hostname to connect to
- * @param int|bool $port The port number to connect to
- * @param int|bool $timeout The timeout value
- * @param string $username
- * @param string $password
- * @param int $debug_level
- *
- * @return bool
- */
- public static function popBeforeSmtp(
- $host,
- $port = false,
- $timeout = false,
- $username = '',
- $password = '',
- $debug_level = 0
- ) {
- $pop = new self();
-
- return $pop->authorise($host, $port, $timeout, $username, $password, $debug_level);
- }
-
- /**
- * Authenticate with a POP3 server.
- * A connect, login, disconnect sequence
- * appropriate for POP-before SMTP authorisation.
- *
- * @param string $host The hostname to connect to
- * @param int|bool $port The port number to connect to
- * @param int|bool $timeout The timeout value
- * @param string $username
- * @param string $password
- * @param int $debug_level
- *
- * @return bool
- */
- public function authorise($host, $port = false, $timeout = false, $username = '', $password = '', $debug_level = 0)
- {
- $this->host = $host;
- // If no port value provided, use default
- if (false === $port) {
- $this->port = static::DEFAULT_PORT;
- } else {
- $this->port = (int) $port;
- }
- // If no timeout value provided, use default
- if (false === $timeout) {
- $this->tval = static::DEFAULT_TIMEOUT;
- } else {
- $this->tval = (int) $timeout;
- }
- $this->do_debug = $debug_level;
- $this->username = $username;
- $this->password = $password;
- // Reset the error log
- $this->errors = [];
- // connect
- $result = $this->connect($this->host, $this->port, $this->tval);
- if ($result) {
- $login_result = $this->login($this->username, $this->password);
- if ($login_result) {
- $this->disconnect();
-
- return true;
- }
- }
- // We need to disconnect regardless of whether the login succeeded
- $this->disconnect();
-
- return false;
- }
-
- /**
- * Connect to a POP3 server.
- *
- * @param string $host
- * @param int|bool $port
- * @param int $tval
- *
- * @return bool
- */
- public function connect($host, $port = false, $tval = 30)
- {
- // Are we already connected?
- if ($this->connected) {
- return true;
- }
-
- //On Windows this will raise a PHP Warning error if the hostname doesn't exist.
- //Rather than suppress it with @fsockopen, capture it cleanly instead
- set_error_handler([$this, 'catchWarning']);
-
- if (false === $port) {
- $port = static::DEFAULT_PORT;
- }
-
- // connect to the POP3 server
- $this->pop_conn = fsockopen(
- $host, // POP3 Host
- $port, // Port #
- $errno, // Error Number
- $errstr, // Error Message
- $tval
- ); // Timeout (seconds)
- // Restore the error handler
- restore_error_handler();
-
- // Did we connect?
- if (false === $this->pop_conn) {
- // It would appear not...
- $this->setError(
- "Failed to connect to server $host on port $port. errno: $errno; errstr: $errstr"
- );
-
- return false;
- }
-
- // Increase the stream time-out
- stream_set_timeout($this->pop_conn, $tval, 0);
-
- // Get the POP3 server response
- $pop3_response = $this->getResponse();
- // Check for the +OK
- if ($this->checkResponse($pop3_response)) {
- // The connection is established and the POP3 server is talking
- $this->connected = true;
-
- return true;
- }
-
- return false;
- }
-
- /**
- * Log in to the POP3 server.
- * Does not support APOP (RFC 2828, 4949).
- *
- * @param string $username
- * @param string $password
- *
- * @return bool
- */
- public function login($username = '', $password = '')
- {
- if (!$this->connected) {
- $this->setError('Not connected to POP3 server');
- }
- if (empty($username)) {
- $username = $this->username;
- }
- if (empty($password)) {
- $password = $this->password;
- }
-
- // Send the Username
- $this->sendString("USER $username" . static::LE);
- $pop3_response = $this->getResponse();
- if ($this->checkResponse($pop3_response)) {
- // Send the Password
- $this->sendString("PASS $password" . static::LE);
- $pop3_response = $this->getResponse();
- if ($this->checkResponse($pop3_response)) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * Disconnect from the POP3 server.
- */
- public function disconnect()
- {
- $this->sendString('QUIT');
- //The QUIT command may cause the daemon to exit, which will kill our connection
- //So ignore errors here
- try {
- @fclose($this->pop_conn);
- } catch (Exception $e) {
- //Do nothing
- }
- }
-
- /**
- * Get a response from the POP3 server.
- *
- * @param int $size The maximum number of bytes to retrieve
- *
- * @return string
- */
- protected function getResponse($size = 128)
- {
- $response = fgets($this->pop_conn, $size);
- if ($this->do_debug >= 1) {
- echo 'Server -> Client: ', $response;
- }
-
- return $response;
- }
-
- /**
- * Send raw data to the POP3 server.
- *
- * @param string $string
- *
- * @return int
- */
- protected function sendString($string)
- {
- if ($this->pop_conn) {
- if ($this->do_debug >= 2) { //Show client messages when debug >= 2
- echo 'Client -> Server: ', $string;
- }
-
- return fwrite($this->pop_conn, $string, strlen($string));
- }
-
- return 0;
- }
-
- /**
- * Checks the POP3 server response.
- * Looks for for +OK or -ERR.
- *
- * @param string $string
- *
- * @return bool
- */
- protected function checkResponse($string)
- {
- if (strpos($string, '+OK') !== 0) {
- $this->setError("Server reported an error: $string");
-
- return false;
- }
-
- return true;
- }
-
- /**
- * Add an error to the internal error store.
- * Also display debug output if it's enabled.
- *
- * @param string $error
- */
- protected function setError($error)
- {
- $this->errors[] = $error;
- if ($this->do_debug >= 1) {
- echo '