Skip to content
GitLab
    • Explore Projects Groups Topics Snippets
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • fusiondirectory-integrator fusiondirectory-integrator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 7
    • Issues 7
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • fusiondirectoryfusiondirectory
  • fusiondirectory-integratorfusiondirectory-integrator
  • Merge requests
  • !40
An error occurred while fetching the assigned milestone of the selected merge_request.

Resolve "[Integrator] - Refactor of current logic and creation of fusiondirectory library."

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged dockx thibault requested to merge 30-integrator-refactor-of-current-logic-and-creation-of-fusiondirectory-library into dev 1 year ago
  • Overview 0
  • Commits 12
  • Pipelines 13
  • Changes 1

Related to #30 (closed)

Viewing commit 19239580
Prev Next
Show latest version
1 file
+ 11
− 1

    Preferences

    File browser
    Compare changes
  • Verified
    19239580
    dockx thibault
    :sparkles: feat(Integrator) - refactor 2 · 19239580
    dockx thibault authored 1 year ago
    refactor 2
src/FusionDirectory/Cli/Application.php
+ 11
− 1
  • View file @ 19239580

  • Edit in single-file editor

  • Open in Web IDE


@@ -71,6 +71,7 @@ class Application
*/
protected function parseArgs (array $argv, int $optind): void
{
//
if ((count($argv) - $optind) != count($this->args)) {
$this->usage($argv);
}
@@ -90,6 +91,11 @@ class Application
unset($infos);
}
/**
* @return string
* Note : This method is used to format the available options in children applications.
* This class is responsible to output the helpers info and thus receive options from children.
*/
protected function generateShortOptions (): string
{
return implode('', array_map(
@@ -117,11 +123,15 @@ class Application
*/
protected function parseOptionsAndArgs (array $argv): array
{
/* Parse options */
// Parse into a short format, options received by children applications.
$shortOptions = $this->generateShortOptions();
// using getopt php method to get all verified and proper values passed to the script within getopt variable.
$getopt = getopt($shortOptions, array_keys($this->options), $optind);
// Below is the verification of passed options / argv to the scripts that are potentially wrong and return the wrong
// options / args not existing.
for ($i = 0; $i < $optind; $i++) {
if (($argv[$i][0] === '-') && ($argv[$i] !== '--')) {
Assignee
dockx thibault's avatar
dockx thibault
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
0
0 Participants
Reference:
Source branch: 30-integrator-refactor-of-current-logic-and-creation-of-fusiondirectory-library

Menu

Explore Projects Groups Topics Snippets