Code Duplication    Length = 11-11 lines in 2 locations

src/services/Model.php 1 location

@@ 409-419 (lines=11) @@
406
     * @param string $toScenario
407
     * @return BaseModel|null
408
     */
409
    public function findByCondition($condition, string $toScenario = null)
410
    {
411
412
        // Find record in db
413
        if ($record = $this->findRecordByCondition($condition)) {
414
            return $this->findByRecord($record, $toScenario);
415
        }
416
417
        return null;
418
419
    }
420
421
    /**
422
     * @param $condition

src/services/Object.php 1 location

@@ 406-416 (lines=11) @@
403
     * @param string $toScenario
404
     * @return BaseObject|null
405
     */
406
    public function findByCondition($condition, string $toScenario = null)
407
    {
408
409
        // Find record in db
410
        if ($record = $this->findRecordByCondition($condition)) {
411
            return $this->findByRecord($record, $toScenario);
412
        }
413
414
        return null;
415
416
    }
417
418
    /**
419
     * @param $condition