Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html/store1/vendor/phootwork/lang/parts/

Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Upload File :
Current File : /var/www/html/store1/vendor/phootwork/lang/parts/IndexFindersPart.php

<?php declare(strict_types=1);
/**
 * This file is part of the Phootwork package.
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * @license MIT License
 * @copyright Thomas Gossmann
 */
namespace phootwork\lang\parts;

trait IndexFindersPart {
	abstract public function find(mixed ...$arguments);

	abstract public function findLast(mixed ...$arguments);

	/**
	 * Returns the index of the given element or null if the element can't be found
	 *
	 * @param mixed $element
	 *
	 * @return int|string|null the index for the given element
	 */
	public function indexOf(mixed $element): int|string|null {
		$out = array_search($element, $this->array, true);

		return $out === false ? null : $out;
	}

	/**
	 * Searches the array with a given callback and returns the index for the last element if found.
	 *
	 * The callback function takes one or two parameters:
	 *
	 *     function ($element [, $query]) {}
	 *
	 * The callback must return a boolean
	 * When it's passed, $query must be the first argument:
	 *
	 *     - find($query, callback)
	 *     - find(callback)
	 *
	 * @param array $arguments
	 *
	 * @return int|string|null the index or null if it hasn't been found
	 */
	public function findLastIndex(mixed ...$arguments): int|string|null {
		/** @var mixed $index */
		$index = count($arguments) === 1 ?
			$this->findLast($arguments[0]) : $this->findLast($arguments[0], $arguments[1]);

		return $this->indexOf($index);
	}

	/**
	 * Searches the array with a given callback and returns the index for the first element if found.
	 *
	 * The callback function takes one or two parameters:
	 *
	 *     function ($element [, $query]) {}
	 *
	 * The callback must return a boolean
	 * When it's passed, $query must be the first argument:
	 *
	 *     - find($query, callback)
	 *     - find(callback)
	 *
	 * @param array $arguments
	 *
	 * @return int|string|null the index or null if it hasn't been found
	 */
	public function findIndex(mixed ...$arguments): int|string|null {
		/** @var mixed $index */
		$index = count($arguments) === 1 ? $this->find($arguments[0]) : $this->find($arguments[0], $arguments[1]);

		return $this->indexOf($index);
	}
}

bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped)
Email: contact@elmoujehidin.net bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped) Email: contact@elmoujehidin.net