Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php final class PhabricatorRepositoryType extends Phobject { const REPOSITORY_TYPE_G..

Decoded Output download

<?php

final class PhabricatorRepositoryType extends Phobject {

  const REPOSITORY_TYPE_GIT         = 'git';
  const REPOSITORY_TYPE_SVN         = 'svn';
  const REPOSITORY_TYPE_MERCURIAL   = 'hg';

  public static function getAllRepositoryTypes() {
    $map = self::getRepositoryTypeMap();
    return ipull($map, 'name');
  }

  public static function getNameForRepositoryType($type) {
    $spec = self::getRepositoryTypeSpec($type);
    return idx($spec, 'name', pht('Unknown ("%s")', $type));
  }

  public static function getRepositoryTypeSpec($type) {
    $map = self::getRepositoryTypeMap();
    return idx($map, $type, array());
  }

  public static function getRepositoryTypeMap() {
    return array(
      self::REPOSITORY_TYPE_GIT => array(
        'name' => pht('Git'),
        'icon' => 'fa-git',
        'image' => 'repo/repo-git.png',
        'create.header' => pht('Create Git Repository'),
        'create.subheader' => pht('Create a new Git repository.'),
      ),
      self::REPOSITORY_TYPE_MERCURIAL => array(
        'name' => pht('Mercurial'),
        'icon' => 'fa-code-fork',
        'image' => 'repo/repo-hg.png',
        'create.header' => pht('Create Mercurial Repository'),
        'create.subheader' => pht('Create a new Mercurial repository.'),
      ),
      self::REPOSITORY_TYPE_SVN => array(
        'name' => pht('Subversion'),
        'icon' => 'fa-database',
        'image' => 'repo/repo-svn.png',
        'create.header' => pht('Create Subversion Repository'),
        'create.subheader' => pht('Create a new Subversion repository.'),
      ),
    );
  }

}
 ?>

Did this file decode correctly?

Original Code

<?php

final class PhabricatorRepositoryType extends Phobject {

  const REPOSITORY_TYPE_GIT         = 'git';
  const REPOSITORY_TYPE_SVN         = 'svn';
  const REPOSITORY_TYPE_MERCURIAL   = 'hg';

  public static function getAllRepositoryTypes() {
    $map = self::getRepositoryTypeMap();
    return ipull($map, 'name');
  }

  public static function getNameForRepositoryType($type) {
    $spec = self::getRepositoryTypeSpec($type);
    return idx($spec, 'name', pht('Unknown ("%s")', $type));
  }

  public static function getRepositoryTypeSpec($type) {
    $map = self::getRepositoryTypeMap();
    return idx($map, $type, array());
  }

  public static function getRepositoryTypeMap() {
    return array(
      self::REPOSITORY_TYPE_GIT => array(
        'name' => pht('Git'),
        'icon' => 'fa-git',
        'image' => 'repo/repo-git.png',
        'create.header' => pht('Create Git Repository'),
        'create.subheader' => pht('Create a new Git repository.'),
      ),
      self::REPOSITORY_TYPE_MERCURIAL => array(
        'name' => pht('Mercurial'),
        'icon' => 'fa-code-fork',
        'image' => 'repo/repo-hg.png',
        'create.header' => pht('Create Mercurial Repository'),
        'create.subheader' => pht('Create a new Mercurial repository.'),
      ),
      self::REPOSITORY_TYPE_SVN => array(
        'name' => pht('Subversion'),
        'icon' => 'fa-database',
        'image' => 'repo/repo-svn.png',
        'create.header' => pht('Create Subversion Repository'),
        'create.subheader' => pht('Create a new Subversion repository.'),
      ),
    );
  }

}

Function Calls

None

Variables

None

Stats

MD5 820063137e725974e399c4bfd575353e
Eval Count 0
Decode Time 93 ms