mirror of
https://github.com/kristuff/abuseipdb
synced 2025-08-21 05:53:13 -07:00
refactoring
This commit is contained in:
parent
9a97e0eee7
commit
eb4e1d6d69
1 changed files with 2 additions and 4 deletions
|
@ -170,14 +170,12 @@ abstract class ApiDefintion
|
||||||
*/
|
*/
|
||||||
protected function getCategoryIndex(string $value, int $index)
|
protected function getCategoryIndex(string $value, int $index)
|
||||||
{
|
{
|
||||||
$i = -1;
|
$i = 0;
|
||||||
foreach ($this->aipdbApiCategories as $cat){
|
foreach ($this->aipdbApiCategories as $cat){
|
||||||
|
|
||||||
$i++;
|
|
||||||
|
|
||||||
if ($cat[$index] === $value) {
|
if ($cat[$index] === $value) {
|
||||||
return $i;
|
return $i;
|
||||||
}
|
}
|
||||||
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// not found
|
// not found
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue