Code Duplication    Length = 15-16 lines in 2 locations

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

@@ 418-433 (lines=16) @@
415
    /**
416
     * @return string
417
     */
418
    private function getPhpPath()
419
    {
420
        if ($this->phpPath) {
421
            return $this->phpPath;
422
        }
423
424
        $phpFinder = new PhpExecutableFinder();
425
        $this->phpPath = $phpFinder->find();
426
        if (!$this->phpPath) {
427
            throw new \RuntimeException(
428
                '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'
429
            );
430
        }
431
432
        return $this->phpPath;
433
    }
434
435
    /**
436
     * @return int

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