@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | ->add('password', PasswordType::class, array('required' => false)) |
| 47 | 47 | ->add('privateKey', TextareaType::class, array('required' => false)) |
| 48 | 48 | ->add('privateKeyPassword', PasswordType::class, array('required' => false)) |
| 49 | - ->add('projectEnvironmentFilePerm', ProjectEnvironmentFilePermType::class, array('required' => false)); |
|
| 49 | + ->add('projectEnvironmentFilePerm', ProjectEnvironmentFilePermType::class, array('required' => false)); |
|
| 50 | 50 | |
| 51 | 51 | if ($this->useCloneLocation === true) { |
| 52 | 52 | $builder->add('gitCloneLocation', TextType::class, array('required' => false)); |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | $resolver->setDefaults(array( |
| 62 | 62 | 'data_class' => 'VersionControl\GitControlBundle\Entity\ProjectEnvironment' |
| 63 | 63 | //,'cascade_validation' => true |
| 64 | -, 'validation_groups' => function (FormInterface $form) { |
|
| 64 | +, 'validation_groups' => function(FormInterface $form) { |
|
| 65 | 65 | if ($form->has('gitaction')) { |
| 66 | 66 | $gitAction = $form->get('gitaction')->getData(); |
| 67 | 67 | |
@@ -37,13 +37,13 @@ discard block |
||
| 37 | 37 | //->add('updatedAt') |
| 38 | 38 | //->add('githubNumber') |
| 39 | 39 | ->add('issueMilestone', EntityType::class, array( |
| 40 | - 'multiple' => false, // Multiple selection allowed |
|
| 40 | + 'multiple' => false, // Multiple selection allowed |
|
| 41 | 41 | //'expanded' => true, // Render as checkboxes |
| 42 | 42 | 'placeholder' => 'Choose a milestone', |
| 43 | 43 | 'required' => false, |
| 44 | 44 | 'property' => 'title', // Assuming that the entity has a "name" property |
| 45 | 45 | 'class' => 'VersionControl\GitControlBundle\Entity\IssueMilestone', |
| 46 | - 'query_builder' => function (IssueMilestoneRepository $er) use ($project) { |
|
| 46 | + 'query_builder' => function(IssueMilestoneRepository $er) use ($project) { |
|
| 47 | 47 | return $er->createQueryBuilder('a') |
| 48 | 48 | ->where('a.project = :project') |
| 49 | 49 | ->setParameter('project', $project) |
@@ -55,12 +55,12 @@ discard block |
||
| 55 | 55 | )) |
| 56 | 56 | //->add('verUser') |
| 57 | 57 | ->add('issueLabel', EntityType::class, array( |
| 58 | - 'multiple' => true, // Multiple selection allowed |
|
| 59 | - 'expanded' => true, // Render as checkboxes |
|
| 58 | + 'multiple' => true, // Multiple selection allowed |
|
| 59 | + 'expanded' => true, // Render as checkboxes |
|
| 60 | 60 | 'property' => 'title', // Assuming that the entity has a "name" property |
| 61 | 61 | 'class' => 'VersionControl\GitControlBundle\Entity\IssueLabel', |
| 62 | 62 | 'required' => false, |
| 63 | - 'query_builder' => function (EntityRepository $er) use ($project) { |
|
| 63 | + 'query_builder' => function(EntityRepository $er) use ($project) { |
|
| 64 | 64 | return $er->createQueryBuilder('a') |
| 65 | 65 | ->where('a.project = :project OR a.allProjects = 1') |
| 66 | 66 | ->setParameter('project', $project) |
@@ -58,10 +58,10 @@ discard block |
||
| 58 | 58 | 'expanded' => true, |
| 59 | 59 | 'required' => false, |
| 60 | 60 | 'choices_as_values' => true, |
| 61 | - 'choice_label' => function ($gitFile) { |
|
| 61 | + 'choice_label' => function($gitFile) { |
|
| 62 | 62 | return $gitFile->getPath1(); |
| 63 | 63 | }, |
| 64 | - 'choice_value' => function ($gitFile) { |
|
| 64 | + 'choice_value' => function($gitFile) { |
|
| 65 | 65 | return $gitFile->getPath1(); |
| 66 | 66 | }, |
| 67 | 67 | //'constraints' => array( |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | if (is_array($this->gitRemoteVersions) && count($this->gitRemoteVersions) > 0) { |
| 99 | 99 | $remoteChoices = array(); |
| 100 | 100 | foreach ($this->gitRemoteVersions as $remoteVersion) { |
| 101 | - $remoteChoices[$remoteVersion[0].'('.$remoteVersion[1].')'] = $remoteVersion[0]; |
|
| 101 | + $remoteChoices[$remoteVersion[0] . '(' . $remoteVersion[1] . ')'] = $remoteVersion[0]; |
|
| 102 | 102 | } |
| 103 | 103 | $builder->add('pushRemote', ChoiceType::class, [ |
| 104 | 104 | 'choices' => $remoteChoices, |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | 'class' => 'VersionControl\GitControlBundle\Entity\User\User', |
| 37 | 37 | 'choice_label' => 'username', |
| 38 | 38 | 'placeholder' => 'Please select a user', |
| 39 | - 'query_builder' => function (EntityRepository $er) use ($projectId) { |
|
| 39 | + 'query_builder' => function(EntityRepository $er) use ($projectId) { |
|
| 40 | 40 | $qb = $er->createQueryBuilder('a'); |
| 41 | 41 | |
| 42 | 42 | $nots = $qb |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | ->add('status', ChoiceType::class, array('label' => 'State', 'choices' => array('open' => 'Open', 'closed' => 'Close'), 'required' => false, 'placeholder' => 'Please select a State') |
| 31 | 31 | ) |
| 32 | 32 | ->add('issueMilestone', EntityType::class, array( |
| 33 | - 'multiple' => false, // Multiple selection allowed |
|
| 33 | + 'multiple' => false, // Multiple selection allowed |
|
| 34 | 34 | //'expanded' => true, // Render as checkboxes |
| 35 | 35 | 'placeholder' => 'Choose a milestone', |
| 36 | 36 | 'required' => false, |
@@ -38,8 +38,8 @@ discard block |
||
| 38 | 38 | 'class' => 'VersionControl\GitControlBundle\Entity\IssueMilestone', |
| 39 | 39 | )) |
| 40 | 40 | ->add('issueLabel', EntityType::class, array( |
| 41 | - 'multiple' => true, // Multiple selection allowed |
|
| 42 | - 'expanded' => true, // Render as checkboxes |
|
| 41 | + 'multiple' => true, // Multiple selection allowed |
|
| 42 | + 'expanded' => true, // Render as checkboxes |
|
| 43 | 43 | 'property' => 'title', // Assuming that the entity has a "name" property |
| 44 | 44 | 'class' => 'VersionControl\GitControlBundle\Entity\IssueLabel', |
| 45 | 45 | 'required' => false, |
@@ -62,13 +62,13 @@ |
||
| 62 | 62 | if (is_numeric($issueId)) { |
| 63 | 63 | if ($modal) { |
| 64 | 64 | $issueUrl = $this->generateIssueUrl($issueId, $projectId, 'issue_show_modal'); |
| 65 | - $link = '<a href="'.$issueUrl.'" data-remote="false" data-toggle="modal" data-target="#issueModal" title="Related to issue'.$issueId.'" class="ajax-modal non-ajax">#'.$issueId.'</a>'; |
|
| 65 | + $link = '<a href="' . $issueUrl . '" data-remote="false" data-toggle="modal" data-target="#issueModal" title="Related to issue' . $issueId . '" class="ajax-modal non-ajax">#' . $issueId . '</a>'; |
|
| 66 | 66 | } else { |
| 67 | 67 | $issueUrl = $this->generateIssueUrl($issueId, $projectId); |
| 68 | - $link = '<a href="'.$issueUrl.'" title="Related to issue #'.$issueId.'">#'.$issueId.'</a>'; |
|
| 68 | + $link = '<a href="' . $issueUrl . '" title="Related to issue #' . $issueId . '">#' . $issueId . '</a>'; |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | - $text = str_replace('#'.$issueId, $link, $text); |
|
| 71 | + $text = str_replace('#' . $issueId, $link, $text); |
|
| 72 | 72 | } |
| 73 | 73 | } |
| 74 | 74 | } |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | if (is_numeric($issueId)) { |
| 68 | 68 | $issueUrl = $this->generateIssueUrl($issueId, $projectId); |
| 69 | 69 | |
| 70 | - return '<a href="'.$issueUrl.'" data-remote="false" data-toggle="modal" data-target="#issueModal" title="Related to issue'.$issueId.'" class="ajax-modal non-ajax">'.$text.'</a>'; |
|
| 70 | + return '<a href="' . $issueUrl . '" data-remote="false" data-toggle="modal" data-target="#issueModal" title="Related to issue' . $issueId . '" class="ajax-modal non-ajax">' . $text . '</a>'; |
|
| 71 | 71 | } |
| 72 | 72 | } |
| 73 | 73 | } |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | foreach ($matches as $commitHash) { |
| 68 | 68 | if ($this->validateCommitHash($commitHash)) { |
| 69 | 69 | $url = $this->generateCommitHistoryUrl($commitHash, $projectId); |
| 70 | - $link = '<a href="'.$url.'" title="Related to Commit Hash '.$commitHash.'">'.$commitHash.'</a>'; |
|
| 70 | + $link = '<a href="' . $url . '" title="Related to Commit Hash ' . $commitHash . '">' . $commitHash . '</a>'; |
|
| 71 | 71 | $text = str_replace($commitHash, $link, $text); |
| 72 | 72 | } |
| 73 | 73 | } |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | if ($totalRecords > 0) { |
| 81 | 81 | $this->numPages = ceil($totalRecords / $recordsPerPage); |
| 82 | 82 | $this->currentPage = $currentPage; |
| 83 | - $content = '<nav><ul class="pagination">'.$this->firstPage().$this->prevPage().$this->listPages().$this->nextPage().$this->lastPage().'</ul></nav>'; |
|
| 83 | + $content = '<nav><ul class="pagination">' . $this->firstPage() . $this->prevPage() . $this->listPages() . $this->nextPage() . $this->lastPage() . '</ul></nav>'; |
|
| 84 | 84 | } else { |
| 85 | 85 | $content = ''; |
| 86 | 86 | } |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | if ($this->currentPage > 1) { |
| 94 | 94 | $prevPage = ($this->currentPage - 1); |
| 95 | 95 | |
| 96 | - return '<li><a href="'.$this->generateUrl($prevPage).'" class="prev">prev</a></li>'; |
|
| 96 | + return '<li><a href="' . $this->generateUrl($prevPage) . '" class="prev">prev</a></li>'; |
|
| 97 | 97 | } |
| 98 | 98 | } |
| 99 | 99 | protected function nextPage() |
@@ -101,14 +101,14 @@ discard block |
||
| 101 | 101 | if ($this->currentPage < $this->numPages) { |
| 102 | 102 | $nextPage = $this->currentPage + 1; |
| 103 | 103 | |
| 104 | - return '<li><a href="'.$this->generateUrl($nextPage).'" class="next">next</a></li>'; |
|
| 104 | + return '<li><a href="' . $this->generateUrl($nextPage) . '" class="next">next</a></li>'; |
|
| 105 | 105 | } |
| 106 | 106 | } |
| 107 | 107 | protected function firstPage() |
| 108 | 108 | { |
| 109 | 109 | $firstPage = ''; |
| 110 | 110 | if ($this->currentPage > ($this->midRange + 1)) { // if number of pages between "currentPage" and "firstPage" exceeds $midRange with 1... |
| 111 | - $firstPage .= '<li><a href="'.$this->generateUrl(1).'" class="first">First Page</a></li>'; // ...show "first page"-link |
|
| 111 | + $firstPage .= '<li><a href="' . $this->generateUrl(1) . '" class="first">First Page</a></li>'; // ...show "first page"-link |
|
| 112 | 112 | if ($this->currentPage > ($this->midRange + 2)) { // if number of pages between $currentPage and "first page" exceeds $midRange with more than 1 |
| 113 | 113 | //$firstPage .= '…'; // add "..." between "1st page"-link and first page in $range |
| 114 | 114 | } |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | if (($this->currentPage < ($this->numPages - $this->midRange) - 1)) { // if number of pages between $currentPage and "last page" exceeds $range with more than two |
| 124 | 124 | //$lastPage .= '…'; // add "..." between "last page"-link and last page in $range |
| 125 | 125 | } |
| 126 | - $lastPage .= '<li><a href="'.$this->generateUrl($this->numPages).'" class="last">'.$this->numPages.'</a></li>'; // show "last page"-link |
|
| 126 | + $lastPage .= '<li><a href="' . $this->generateUrl($this->numPages) . '" class="last">' . $this->numPages . '</a></li>'; // show "last page"-link |
|
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | return $lastPage; |
@@ -136,10 +136,10 @@ discard block |
||
| 136 | 136 | for ($i = ($this->currentPage - $this->midRange); $i < (($this->currentPage + $this->midRange) + 1); ++$i) { |
| 137 | 137 | if (($i > 0) && ($i <= $this->numPages)) { // if page number are within page range |
| 138 | 138 | if ($i == $this->currentPage) { |
| 139 | - $listPages .= '<li class="active"><a href="'.$this->generateUrl($i).'">'.$i.'</a></li>'; |
|
| 139 | + $listPages .= '<li class="active"><a href="' . $this->generateUrl($i) . '">' . $i . '</a></li>'; |
|
| 140 | 140 | } // if we're on current page |
| 141 | 141 | else { |
| 142 | - $listPages .= '<li><a href="'.$this->generateUrl($i).'">'.$i.'</a></li>'; |
|
| 142 | + $listPages .= '<li><a href="' . $this->generateUrl($i) . '">' . $i . '</a></li>'; |
|
| 143 | 143 | } // if not current page |
| 144 | 144 | } |
| 145 | 145 | } |