Commit 1cd13a8f authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2515018 by joshi.rohit100, sdstyles, joelpittet: Lowercase the...

Issue #2515018 by joshi.rohit100, sdstyles, joelpittet: Lowercase the instances of camelcase'd instanceOf in core for consistency
parent 70d81c54
Loading
Loading
Loading
Loading
+1 −1
Changes for core/includes/theme.inc: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -385,7 +385,7 @@ function theme_get_setting($setting_name, $theme = NULL) {
 *   https://www.drupal.org/node/2575065
 */
function theme_render_and_autoescape($arg) {
  if ($arg instanceOf MarkupInterface) {
  if ($arg instanceof MarkupInterface) {
    return (string) $arg;
  }
  $return = NULL;
+5 −5
Changes for core/lib/Drupal/Component/Datetime/DateTimePlus.php: 5 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -203,7 +203,7 @@ public static function createFromFormat($format, $time, $timezone = NULL, $setti
    $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 @@ public static function createFromFormat($format, $time, $timezone = NULL, $setti
      // 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 @@ protected function prepareTime($time) {
   */
  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 @@ protected function prepareTimezone($timezone) {

    // 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);
+1 −1
Changes for core/lib/Drupal/Component/Utility/SafeMarkup.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -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;
  }

  /**
+1 −1
Changes for core/lib/Drupal/Core/Config/Entity/Query/Condition.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ public function compile($configs) {
    $single_conditions = array();
    $condition_groups = array();
    foreach ($this->conditions as $condition) {
      if ($condition['field'] instanceOf ConditionInterface) {
      if ($condition['field'] instanceof ConditionInterface) {
        $condition_groups[] = $condition;
      }
      else {
+2 −2
Changes for core/lib/Drupal/Core/Database/Query/Condition.php: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -277,10 +277,10 @@ function __clone() {
    $this->changed = TRUE;
    foreach ($this->conditions as $key => $condition) {
      if ($key !== '#conjunction') {
        if ($condition['field'] instanceOf ConditionInterface) {
        if ($condition['field'] instanceof ConditionInterface) {
          $this->conditions[$key]['field'] = clone($condition['field']);
        }
        if ($condition['value'] instanceOf SelectInterface) {
        if ($condition['value'] instanceof SelectInterface) {
          $this->conditions[$key]['value'] = clone($condition['value']);
        }
      }
Loading