Unverified Commit 2d8538d9 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3540528 by andypost, jacktonkin: Clean-up deprecated non-standard cast names

(cherry picked from commit e35092ab)
parent d6d33f2b
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -264,7 +264,7 @@ public function setIgnoredAnnotationNames(array $names)
     */
    public function setIgnoreNotImportedAnnotations($bool)
    {
        $this->ignoreNotImportedAnnotations = (boolean) $bool;
        $this->ignoreNotImportedAnnotations = (bool) $bool;
    }

    /**
+1 −1
Original line number Diff line number Diff line
@@ -516,7 +516,7 @@ public function checkErrors() {
   *   otherwise.
   */
  public function hasErrors() {
    return (boolean) count($this->errors);
    return (bool) count($this->errors);
  }

  /**
+3 −3
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ class Number {
   * @see http://opensource.apple.com/source/WebCore/WebCore-1298/html/NumberInputType.cpp
   */
  public static function validStep($value, $step, $offset = 0.0) {
    $double_value = (double) abs($value - $offset);
    $double_value = (float) abs($value - $offset);

    // The fractional part of a double has 53 bits. The greatest number that
    // could be represented with that is 2^53. If the given value is even bigger
@@ -44,13 +44,13 @@ public static function validStep($value, $step, $offset = 0.0) {
    }

    // Now compute that remainder of a division by $step.
    $remainder = (double) abs($double_value - $step * round($double_value / $step));
    $remainder = (float) abs($double_value - $step * round($double_value / $step));

    // $remainder is a double precision floating point number. Remainders that
    // can't be represented with single precision floats are acceptable. The
    // fractional part of a float has 24 bits. That means remainders smaller than
    // $step * 2^-24 are acceptable.
    $computed_acceptable_error = (double) ($step / pow(2.0, 24));
    $computed_acceptable_error = (float) ($step / pow(2.0, 24));

    return $computed_acceptable_error >= $remainder || $remainder >= ($step - $computed_acceptable_error);
  }
+2 −2
Original line number Diff line number Diff line
@@ -171,14 +171,14 @@ public function hasTag($tag) {
   * {@inheritdoc}
   */
  public function hasAllTags() {
    return !(boolean) array_diff(func_get_args(), array_keys($this->alterTags));
    return !(bool) array_diff(func_get_args(), array_keys($this->alterTags));
  }

  /**
   * {@inheritdoc}
   */
  public function hasAnyTag() {
    return (boolean) array_intersect(func_get_args(), array_keys($this->alterTags));
    return (bool) array_intersect(func_get_args(), array_keys($this->alterTags));
  }

  /**
+2 −2
Original line number Diff line number Diff line
@@ -368,14 +368,14 @@ public function hasTag($tag) {
   * {@inheritdoc}
   */
  public function hasAllTags() {
    return !(boolean) array_diff(func_get_args(), array_keys($this->alterTags));
    return !(bool) array_diff(func_get_args(), array_keys($this->alterTags));
  }

  /**
   * {@inheritdoc}
   */
  public function hasAnyTag() {
    return (boolean) array_intersect(func_get_args(), array_keys($this->alterTags));
    return (bool) array_intersect(func_get_args(), array_keys($this->alterTags));
  }

  /**
Loading