ConfigurationRepository::findRecord()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 11
rs 9.4285
cc 2
eloc 7
nc 2
nop 1
1
<?php
2
3
/**
4
 * ConfigurationRepository
5
 */
6
7
namespace HDNET\OnpageIntegration\Domain\Repository;
8
9
/**
10
 * Class ConfigurationRepository
11
 */
12
class ConfigurationRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
13
{
14
15
    /**
16
     * Find next Record
17
     *
18
     * @param integer $uid
19
     *
20
     * @return object
21
     */
22
    public function findRecord($uid)
23
    {
24
        $query = $this->findByUid($uid);
25
26
        if ($query) {
27
            return $query;
28
        } else {
29
            $uid++;
30
            return $this->findRecord($uid);
31
        }
32
    }
33
}
34