Code Duplication    Length = 15-16 lines in 2 locations

eZ/Bundle/EzPublishCoreBundle/Command/UpdateTimestampsToUTCCommand.php 1 location

@@ 486-500 (lines=15) @@
483
    /**
484
     * @return string
485
     */
486
    private function getPhpPath()
487
    {
488
        if ($this->phpPath) {
489
            return $this->phpPath;
490
        }
491
        $phpFinder = new PhpExecutableFinder();
492
        $this->phpPath = $phpFinder->find();
493
        if (!$this->phpPath) {
494
            throw new RuntimeException(
495
                'The php executable could not be found, it\'s needed for executing parable sub processes, so add it to your PATH environment variable and try again'
496
            );
497
        }
498
499
        return $this->phpPath;
500
    }
501
502
    /**
503
     * @param $dateString string

eZ/Bundle/EzPublishCoreBundle/Command/ReindexCommand.php 1 location

@@ 425-440 (lines=16) @@
422
    /**
423
     * @return string
424
     */
425
    private function getPhpPath()
426
    {
427
        if ($this->phpPath) {
428
            return $this->phpPath;
429
        }
430
431
        $phpFinder = new PhpExecutableFinder();
432
        $this->phpPath = $phpFinder->find();
433
        if (!$this->phpPath) {
434
            throw new \RuntimeException(
435
                'The php executable could not be found, it\'s needed for executing parable sub processes, so add it to your PATH environment variable and try again'
436
            );
437
        }
438
439
        return $this->phpPath;
440
    }
441
442
    /**
443
     * @return int