1 | <?php |
||
29 | class RevParseCommand extends BaseCommand |
||
30 | { |
||
31 | public const GIT_REV_PARSE_COMMAND = 'rev-parse'; |
||
32 | |||
33 | public const OPTION_ALL = '--all'; |
||
34 | public const OPTION_KEEP_DASHDASH = '--keep-dashdash'; |
||
35 | public const OPTION_STOP_AT_NON_OPTION = '--stop-at-non-option'; |
||
36 | public const OPTION_SQ_QUOTE = '--sq-quote'; |
||
37 | public const OPTION_REVS_ONLY = '--revs-only'; |
||
38 | public const OPTION_NO_REVS = '--no-revs'; |
||
39 | public const OPTION_FLAGS = '--flags'; |
||
40 | public const OPTION_NO_FLAGS = '--no-flags'; |
||
41 | public const OPTION_DEFAULT = '--default'; |
||
42 | public const OPTION_VERIFY = '--verify'; |
||
43 | public const OPTION_QUIET = '--quiet'; |
||
44 | public const OPTION_SQ = '--sq'; |
||
45 | public const OPTION_NOT = '--not'; |
||
46 | public const OPTION_SYMBOLIC = '--symbolic'; |
||
47 | public const OPTION_SYMBOLIC_FULL_NAME = '--symbolic-full-name'; |
||
48 | public const OPTION_ABBREV_REF = '--abbrev-ref'; |
||
49 | public const OPTION_DISAMBIGUATE = '--disambiguate'; |
||
50 | public const OPTION_BRANCHES = '--branches'; |
||
51 | public const OPTION_TAGS = '--tags'; |
||
52 | public const OPTION_REMOTES = '--remotes'; |
||
53 | public const OPTION_GLOB = '--glob'; |
||
54 | public const OPTION_SHOW_TOPLEVEL = '--show-toplevel'; |
||
55 | public const OPTION_SHOW_PREFIX = '--show-prefix'; |
||
56 | public const OPTION_SHOW_CDUP = '--show-cdup'; |
||
57 | public const OPTION_GIT_DIR = '--git-dir'; |
||
58 | public const OPTION_IS_INSIDE_GIT_DIR = '--is-inside-git-dir'; |
||
59 | public const OPTION_IS_INSIDE_WORK_TREE = '--is-inside-work-tree'; |
||
60 | public const OPTION_IS_BARE_REPOSIORY = '--is-bare-repository'; |
||
61 | public const OPTION_LCOAL_ENV_VARS = '--local-env-vars'; |
||
62 | public const OPTION_SHORT = '--short'; |
||
63 | public const OPTION_SINCE = '--since'; |
||
64 | public const OPTION_AFTER = '--after'; |
||
65 | public const OPTION_UNTIL = '--until'; |
||
66 | public const OPTION_BEFORE = '--before'; |
||
67 | public const OPTION_RESOLVE_GIT_DIR = '--resolve-git-dir'; |
||
68 | |||
69 | public const TAG_HEAD = "HEAD"; |
||
70 | |||
71 | /** |
||
72 | * constructor |
||
73 | * |
||
74 | * @param \GitElephant\Repository $repo The repository object this command |
||
75 | * will interact with |
||
76 | */ |
||
77 | 6 | public function __construct(Repository $repo = null) |
|
81 | |||
82 | /** |
||
83 | * @param array $options |
||
84 | * @param Branch|string $arg |
||
85 | * |
||
86 | * @throws \RuntimeException |
||
87 | * @return string |
||
88 | */ |
||
89 | 6 | public function revParse($arg = null, array $options = []): string |
|
104 | } |
||
105 |
This check looks at variables that have been passed in as parameters and are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.