# $taxRules->indexOf()

> Correct position detection for objects. The method will automatically detect objects or ids and then search accordingly.

- Source: `src/Cms/Collection.php#L232` <https://github.com/getkirby/kirby/blob/6.0.0-beta.1/src/Cms/Collection.php#L232>
- Inherited from Kirby, not part of the Merx API. See <https://getkirby.com/docs/reference>.

```php
$taxRules->indexOf(string|TValue $needle): int|false
```

## Parameters

| Name | Type | Default |
| --- | --- | --- |
| `$needle` | `string\|TValue` | `–` |

## Return type

`int|false`

## Parent class

`Wagnerwagner\Merx\TaxRules` inherited from `Kirby\Cms\Collection`
