Update to drupal-org-drupal 8.0.0-rc2. For more information, see https://www.drupal.org/node/2598668

This commit is contained in:
Pantheon Automation 2015-10-21 21:44:50 -07:00 committed by Greg Anderson
parent f32e58e4b1
commit 8e18df8c36
3062 changed files with 15044 additions and 172506 deletions

View file

@ -203,7 +203,7 @@ class DateTimePlus {
$datetimeplus = new static('', $timezone, $settings);
$date = \DateTime::createFromFormat($format, $time, $datetimeplus->getTimezone());
if (!$date instanceOf \DateTime) {
if (!$date instanceof \DateTime) {
throw new \Exception('The date cannot be created from a format.');
}
else {
@ -212,10 +212,10 @@ class DateTimePlus {
// re-creating the date/time formatted string and comparing it to the input. For
// instance, an input value of '11' using a format of Y (4 digits) gets
// created as '0011' instead of '2011'.
if ($date instanceOf DateTimePlus) {
if ($date instanceof DateTimePlus) {
$test_time = $date->format($format, $settings);
}
elseif ($date instanceOf \DateTime) {
elseif ($date instanceof \DateTime) {
$test_time = $date->format($format);
}
$datetimeplus->setTimestamp($date->getTimestamp());
@ -345,7 +345,7 @@ class DateTimePlus {
*/
protected function prepareTimezone($timezone) {
// If the input timezone is a valid timezone object, use it.
if ($timezone instanceOf \DateTimezone) {
if ($timezone instanceof \DateTimezone) {
$timezone_adjusted = $timezone;
}
@ -356,7 +356,7 @@ class DateTimePlus {
// Default to the system timezone when not explicitly provided.
// If the system timezone is missing, use 'UTC'.
if (empty($timezone_adjusted) || !$timezone_adjusted instanceOf \DateTimezone) {
if (empty($timezone_adjusted) || !$timezone_adjusted instanceof \DateTimezone) {
$system_timezone = date_default_timezone_get();
$timezone_name = !empty($system_timezone) ? $system_timezone : 'UTC';
$timezone_adjusted = new \DateTimeZone($timezone_name);

View file

@ -19,7 +19,7 @@ use Drupal\Component\Utility\Unicode;
* More ideas are taken from:
* http://www.ics.uci.edu/~eppstein/161/960229.html
*
* Some ideas are (and a bit of code) are from from analyze.c, from GNU
* Some ideas (and a bit of code) are from analyze.c, from GNU
* diffutils-2.7, which can be found at:
* ftp://gnudist.gnu.org/pub/gnu/diffutils/diffutils-2.7.tar.gz
*

View file

@ -7,10 +7,6 @@
namespace Drupal\Component\Gettext;
use Drupal\Component\Gettext\PoWriterInterface;
use Drupal\Component\Gettext\PoHeader;
use Drupal\Component\Gettext\PoItem;
/**
* Defines a Gettext PO memory writer, to be used by the installer.
*/

View file

@ -7,8 +7,6 @@
namespace Drupal\Component\Gettext;
use Drupal\Component\Gettext\PoHeader;
/**
* Methods required for both reader and writer implementations.
*

View file

@ -7,8 +7,6 @@
namespace Drupal\Component\Gettext;
use Drupal\Component\Gettext\PoMetadataInterface;
/**
* Shared interface definition for all Gettext PO Readers.
*/

View file

@ -7,9 +7,6 @@
namespace Drupal\Component\Gettext;
use Drupal\Component\Gettext\PoReaderInterface;
use Drupal\Component\Gettext\PoStreamInterface;
use Drupal\Component\Gettext\PoHeader;
use Drupal\Component\Utility\SafeMarkup;
/**

View file

@ -7,12 +7,6 @@
namespace Drupal\Component\Gettext;
use Drupal\Component\Gettext\PoHeader;
use Drupal\Component\Gettext\PoItem;
use Drupal\Component\Gettext\PoReaderInterface;
use Drupal\Component\Gettext\PoWriterInterface;
use Drupal\Component\Gettext\PoStreamInterface;
/**
* Defines a Gettext PO stream writer.
*/

View file

@ -7,9 +7,6 @@
namespace Drupal\Component\Gettext;
use Drupal\Component\Gettext\PoMetadataInterface;
use Drupal\Component\Gettext\PoItem;
/**
* Shared interface definition for all Gettext PO Writers.
*/

View file

@ -33,11 +33,21 @@ abstract class SecuredRedirectResponse extends RedirectResponse {
*/
public static function createFromRedirectResponse(RedirectResponse $response) {
$safe_response = new static($response->getTargetUrl(), $response->getStatusCode(), $response->headers->allPreserveCase());
$safe_response->setProtocolVersion($response->getProtocolVersion());
$safe_response->setCharset($response->getCharset());
$safe_response->fromResponse($response);
return $safe_response;
}
/**
* Copies over the values from the given response.
*
* @param \Symfony\Component\HttpFoundation\RedirectResponse $response
* The redirect reponse object.
*/
protected function fromResponse(RedirectResponse $response) {
$this->setProtocolVersion($response->getProtocolVersion());
$this->setCharset($response->getCharset());
}
/**
* {@inheritdoc}
*/

View file

@ -6,7 +6,6 @@
namespace Drupal\Component\Plugin\Exception;
use Drupal\Component\Plugin\Exception\ExceptionInterface;
use \BadMethodCallException;
/**

View file

@ -41,7 +41,7 @@ class SafeMarkup {
* \Drupal\Component\Render\MarkupInterface.
*/
public static function isSafe($string, $strategy = 'html') {
return $string instanceOf MarkupInterface;
return $string instanceof MarkupInterface;
}
/**