private function getBackupFileDate($file, $ext = 'php')
    {
        $matches = [];

        if (preg_match('@^(.*)([0-9]{8}_[0-9]{6})\\.'.$ext.'$@', $file, $matches) === 1) {
            return \DateTime::createFromFormat(self::BACKUP_DATE_FORMAT, $matches[2]);
        }
        // @codeCoverageIgnoreStart
        // Cannot happen because of glob but safer
        else {
            return null;
        }
        // @codeCoverageIgnoreEnd
    }