@@ -20,13 +20,13 @@ |
||
20 | 20 | $qb = $em->createQueryBuilder(); |
21 | 21 | |
22 | 22 | $qb->select('a') |
23 | - ->from('VersionControlGitControlBundle:Project', 'a'); |
|
23 | + ->from('VersionControlGitControlBundle:Project', 'a'); |
|
24 | 24 | |
25 | - //If keyword is set |
|
26 | - if ($keyword) { |
|
27 | - $qb->andWhere('a.title LIKE :keyword OR a.title LIKE :keyword') |
|
28 | - ->setParameter('keyword', '%'.$keyword.'%'); |
|
29 | - } |
|
25 | + //If keyword is set |
|
26 | + if ($keyword) { |
|
27 | + $qb->andWhere('a.title LIKE :keyword OR a.title LIKE :keyword') |
|
28 | + ->setParameter('keyword', '%'.$keyword.'%'); |
|
29 | + } |
|
30 | 30 | |
31 | 31 | if ($queryOnly === true) { |
32 | 32 | return $qb; |
@@ -25,7 +25,7 @@ |
||
25 | 25 | //If keyword is set |
26 | 26 | if ($keyword) { |
27 | 27 | $qb->andWhere('a.title LIKE :keyword OR a.title LIKE :keyword') |
28 | - ->setParameter('keyword', '%'.$keyword.'%'); |
|
28 | + ->setParameter('keyword', '%' . $keyword . '%'); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | if ($queryOnly === true) { |
@@ -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 |
@@ -46,8 +46,8 @@ |
||
46 | 46 | return null; |
47 | 47 | } |
48 | 48 | $entity = $this->objectManager |
49 | - ->getRepository($this->class) |
|
50 | - ->find($id); |
|
49 | + ->getRepository($this->class) |
|
50 | + ->find($id); |
|
51 | 51 | if (null === $entity) { |
52 | 52 | throw new TransformationFailedException(); |
53 | 53 | } |
@@ -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) |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | ->add('comment', TextareaType::class, array( |
41 | 41 | 'label' => 'Comment', 'required' => false, |
42 | 42 | //,'constraints' => array( |
43 | - // new NotBlank(array('message'=>'Please add a commit comment.')) |
|
43 | + // new NotBlank(array('message'=>'Please add a commit comment.')) |
|
44 | 44 | //) |
45 | 45 | )) |
46 | 46 | ->add('statushash', HiddenType::class, array( |
@@ -60,9 +60,9 @@ discard block |
||
60 | 60 | 'choice_label' => function ($gitFile) { |
61 | 61 | return $gitFile->getPath1(); |
62 | 62 | }, |
63 | - 'choice_value' => function ($gitFile) { |
|
64 | - return $gitFile->getPath1(); |
|
65 | - }, |
|
63 | + 'choice_value' => function ($gitFile) { |
|
64 | + return $gitFile->getPath1(); |
|
65 | + }, |
|
66 | 66 | //'constraints' => array( |
67 | 67 | // new NotBlank() |
68 | 68 | // ,new \VersionControl\GitControlBundle\Validator\Constraints\StatusHash() |
@@ -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 |
@@ -38,7 +38,7 @@ |
||
38 | 38 | public function configureOptions(OptionsResolver $resolver) |
39 | 39 | { |
40 | 40 | $resolver->setDefaults(array( |
41 | - //'data_class' => 'Lre\MetadataBundle\Entity\Curriculum\ResourceCurriculum', |
|
41 | + //'data_class' => 'Lre\MetadataBundle\Entity\Curriculum\ResourceCurriculum', |
|
42 | 42 | //'data_class' => NULL, |
43 | 43 | //'cascade_validation' => true, |
44 | 44 | )); |
@@ -37,7 +37,7 @@ |
||
37 | 37 | 'property' => 'title', // Assuming that the entity has a "name" property |
38 | 38 | 'class' => 'VersionControl\GitControlBundle\Entity\IssueMilestone', |
39 | 39 | )) |
40 | - ->add('issueLabel', EntityType::class, array( |
|
40 | + ->add('issueLabel', EntityType::class, array( |
|
41 | 41 | 'multiple' => true, // Multiple selection allowed |
42 | 42 | 'expanded' => true, // Render as checkboxes |
43 | 43 | 'property' => 'title', // Assuming that the entity has a "name" property |
@@ -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 | } |