isCircular

@param mixed|string $dep
@return bool
163100
public function isCircular($dep)
    {
        foreach ($this->circular as $item => $deps) {
            if (in_array($dep, $deps)) {
                return true;
            }
        }
    }
1159827
public function calcSphericalDistanceTo( Coordinate $otherPoint )
   {

      if ( ! $this->isValid() )
      {
         return 0;
      }

      $b1 = $this->Latitude->getDecimalValue();
      $l1 = $this->Longitude->getDecimalValue();
      $b2 = $otherPoint->Latitude->getDecimalValue();
      $l2 = $otherPoint->Longitude->getDecimalValue();

      $rbreite1   = $b1 * self::DEG2RAD;
      $rlaenge1   = $l1 * self::DEG2RAD;
      $rbreite2   = $b2 * self::DEG2RAD;
      $rlaenge2   = $l2 * self::DEG2RAD;
      $rwinkel    = \acos( \sin( $rbreite1 ) * \sin( $rbreite2 ) + \cos( $rbreite1 )
                                                                   * \cos( $rbreite2 ) * \cos( \abs( $rlaenge2 - $rlaenge1 ) ) );
      $entfernung = $rwinkel * 6370;

      return \round( $entfernung, 3 );

   }
102203
public static function isRoman(string $str) : bool
    {
        $str    = strtoupper(Parser::replaceRoman($str));
        $ary    = Parser::strToArray($str);
        $result = true;
        foreach ($ary as $key => $value) {
            $code = Mbstring::mb_ord($value);
            if ($code >= 97 && 122) {
                $value = strtoupper($value);
            }
            if (array_key_exists($value, self::$romans)) {
                continue;
            } else {
                $result = false;
                break;
            }
        }
        if ($result) {
            foreach (self::$romans as $key => $value) {
                while (mb_strpos($str, $key) === 0) {
                    $str = mb_substr($str, strlen($key));
                }
            }
            $result = mb_strlen($str) === 0;
        }
        return $result;
    }
268984
public function isCorrectAnswer($answer)
    {

        $session = Controller::curr()->getRequest()->getSession();

        $v1 = $session->get("mathQuestionV1");
        $v2 = $session->get("mathQuestionV2");

        $session->clear('mathQuestionV1');
        $session->clear('mathQuestionV2');

        $word = MathSpamProtectorField::digit_to_word($v1 + $v2);

        return ($word == strtolower($answer) || ($this->config()->get('allow_numeric_answer') && (($v1 + $v2) == $answer)));
    }
1121055
public function lt($number)
    {
        return (bool) (bccomp($this->number, static::validateInputNumber($number), $this->precision) === -1);
    }
552208
public function gt($number)
    {
        return (bool) (bccomp($this->number, static::validateInputNumber($number), $this->precision) === 1);
    }
984545
protected function isConstantExpression($expr)
	{
		// Replace strings to avoid false-positives
		$expr = preg_replace('("[^"]*"|\'[^\']*\')', '0', $expr);

		// Match function calls against the list of supported functions
		preg_match_all('(\\w[-\\w]+(?=\\())', $expr, $m);
		if (count(array_diff($m[0], $this->supportedFunctions)) > 0)
		{
			return false;
		}

		// Match unsupported characters and keywords, as well as function calls without arguments
		return !preg_match('([^\\s\\-0-9a-z\\(-.]|\\.(?![0-9])|\\b[-a-z](?![-\\w]+\\()|\\(\\s*\\))i', $expr);
	}
626637
public static function is_multidimensional($context, $shallow=true)
      {
        if (!(sizeof($context) > 0)) {
             return FALSE;
        }

        if ($shallow && (is_array($context[0]) || is_object($context[0]))) {
             return TRUE;
        }

        return false;
      }
414071
private static function isDelimiter($ch, array $delimiters) {
    if (is_empty($delimiters)) {
      return ctype_space($ch);
    }
    foreach($delimiters as $delimiter) {
      if ($ch === $delimiter) {
        return true;
      }
    }
    return false;
  }
992171
private function validarCep($cep) {
	    // retira espacos em branco
	    $cep = str_replace("-", "", trim($cep));

	    // expressao regular para avaliar o cep
	    $checkCep = preg_match("/^[0-9]{8}$/", $cep);
	    
	    // verifica o resultado
	    if(!$checkCep) {            
	        return false;
	    }
	    
	    return true;
	}
977950
function _checkCircular (opts, obj) {
  var key
  if (util.isObject(obj)) {
    if (~opts._visited.indexOf(obj)) {
      return true
    }
    opts._visited.push(obj)
    for (key in obj) {
      if (obj.hasOwnProperty(key) && _checkCircular(opts, obj[key])) {
        return true
      }
    }
  }
  return false
}
273835
public function isPlural($root) {
		$out = false;

		if ('' !== $root) {
			if (in_array(strtolower($root), $this->uncountable)) {
				$out = true;
			} else {
				$out = $this->isIrregular($this->irregular, $root);

				if (!$out) {
					$out = $this->isIrregular(array_keys($this->singular), $root);
				}

				if (!$out && 's' == $root[strlen($root) - 1]) {
					$out = true;
				}
			}
		}

		return $out;
	}
840810
public function adjacentSibling($direction = 1)
    {
        $parent = $this->parent();
        $collection = $parent ? $parent->collection('content', false) : null;
        if ($collection instanceof Collection) {
            return $collection->adjacentSibling($this->path(), $direction);
        }

        return false;
    }
987485
def has_rotational(self):
        """"""
        for member in self.get_members():
            if member.physical_drives.has_rotational:
                return True
        return False
1090904
def contains_circle(self, pt, radius):
    """"""
    return (self.l < pt.x - radius and self.r > pt.x + radius and
            self.t < pt.y - radius and self.b > pt.y + radius)
957295
private static function isDelim($provider, $delimiter = '=')
    {
        if (mb_strpos($provider, $delimiter) !== false) {

            $res = explode('=', $provider);

            return $res;
        }

        return false;

    }
439186
public function isPrimitive($types) : bool
    {
        if (!is_array($types)) {
            $types = [$types];
        }

        $primitive = false;
        $primitiveType = [
            'int',
            'int32',
            'integer',
            'float',
            'double',
            'string',
            'bool',
            'boolean',
            'array',
            '\\Cawa\\SwaggerServer\\DateTime',
        ];

        foreach ($types as $type) {
            if (in_array($type, $primitiveType)) {
                $primitive = true;
            }
        }

        return $primitive;
    }