Completed
Pull Request — develop (#259)
by ANTHONIUS
09:01
created
module/Organizations/src/Organizations/Entity/Organization.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
      */
234 234
     public function getParent($returnSelf = false)
235 235
     {
236
-        return $this->parent ? : ($returnSelf ? $this : null);
236
+        return $this->parent ?: ($returnSelf ? $this : null);
237 237
     }
238 238
 
239 239
     /**
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
      */
466 466
     public function getPermissionsResourceId()
467 467
     {
468
-        return 'organization:' . $this->getId();
468
+        return 'organization:'.$this->getId();
469 469
     }
470 470
 
471 471
     /**
Please login to merge, or discard this patch.
module/Solr/src/Solr/Controller/ConsoleController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
  */
25 25
 class ConsoleController extends AbstractActionController
26 26
 {
27
-    const EVENT_UPDATE_INDEX    = 'solr.console.update_index';
27
+    const EVENT_UPDATE_INDEX = 'solr.console.update_index';
28 28
 
29 29
     public function activeJobIndexAction()
30 30
     {
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
         $progressBar = new ProgressBar($count);
44 44
         $i = 1;
45
-        foreach($jobs as $job){
45
+        foreach ($jobs as $job) {
46 46
             /* @var Job $job */
47 47
             $jobSubscriber->consoleIndex($job);
48 48
             $progressBar->update($i, 'Job '.$i.' / '.$count);
Please login to merge, or discard this patch.
module/Cv/src/Cv/Options/ModuleOptions.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
      *
35 35
      * @var array $attachmentsMimeType
36 36
      */
37
-    protected $attachmentsMimeType = array('image','applications/pdf',
37
+    protected $attachmentsMimeType = array('image', 'applications/pdf',
38 38
         'application/x-pdf',
39 39
         'application/acrobat',
40 40
         'applications/vnd.pdf',
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
     /**
94 94
      * Gets the the maximum number of allowed attachments
95 95
      *
96
-     * @return string
96
+     * @return integer
97 97
      */
98 98
     public function getAttachmentsCount()
99 99
     {
Please login to merge, or discard this patch.
module/Cv/src/Cv/Controller/ManageController.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -109,8 +109,7 @@
 block discarded – undo
109 109
                 if ('file-uri' === $params->fromPost('return')) {
110 110
                     $content = $viewHelperManager->get('basepath')
111 111
                         ->__invoke($form->getHydrator()->getLastUploadedFile()->getUri());
112
-                }
113
-                else {
112
+                } else {
114 113
                     if ($form instanceof SummaryFormInterface) {
115 114
                         $form->setRenderMode(SummaryFormInterface::RENDER_SUMMARY);
116 115
                         $viewHelper = 'summaryform';
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -173,6 +173,9 @@
 block discarded – undo
173 173
         return $this->redirect()->refresh();
174 174
     }
175 175
 
176
+    /**
177
+     * @param \Cv\Repository\Cv $repository
178
+     */
176 179
     private function getCv($repository, $user)
177 180
     {
178 181
         $id =
Please login to merge, or discard this patch.
module/Cv/src/Cv/Form/AttachmentsFormFactory.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -73,14 +73,14 @@
 block discarded – undo
73 73
         $count = $options->getAttachmentsCount();
74 74
 
75 75
         $form->setIsDisableCapable(false)
76
-             ->setIsDisableElementsCapable(false)
77
-             ->setIsDescriptionsEnabled(true)
78
-             ->setDescription(
76
+                ->setIsDisableElementsCapable(false)
77
+                ->setIsDescriptionsEnabled(true)
78
+                ->setDescription(
79 79
                 /*@translate*/ 'Attach images or PDF Documents to your application. Drag&drop them, or click into the attachement area. You can upload up to %sMB',
80
-                 [round($size/(1024*1024))>0? round($size/(1024*1024)):round($size/(1024*1024), 1)]
81
-             )
82
-             ->setParam('return', 'file-uri')
83
-             ->setLabel(/*@translate*/ 'Attachments');
80
+                    [round($size/(1024*1024))>0? round($size/(1024*1024)):round($size/(1024*1024), 1)]
81
+                )
82
+                ->setParam('return', 'file-uri')
83
+                ->setLabel(/*@translate*/ 'Attachments');
84 84
 
85 85
         /** @var $file FileUpload*/
86 86
         $file = $form->get($this->fileName);
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      *
53 53
      * @var string
54 54
      */
55
-    protected $options="Cv/Options";
55
+    protected $options = "Cv/Options";
56 56
 
57 57
 
58 58
     /**
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
              ->setIsDescriptionsEnabled(true)
78 78
              ->setDescription(
79 79
                 /*@translate*/ 'Attach images or PDF Documents to your CV. Drag&drop them, or click into the attachement area. You can upload up to %sMB',
80
-                 [round($size/(1024*1024))>0? round($size/(1024*1024)):round($size/(1024*1024), 1)]
80
+                 [round($size / (1024 * 1024)) > 0 ? round($size / (1024 * 1024)) : round($size / (1024 * 1024), 1)]
81 81
              )
82 82
              ->setParam('return', 'file-uri')
83 83
              ->setLabel(/*@translate*/ 'Attachments');
Please login to merge, or discard this patch.
module/Cv/src/Cv/Repository/Event/DeleteRemovedAttachmentsSubscriber.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,8 +41,8 @@
 block discarded – undo
41 41
         $fileId = new \MongoId($file->id);
42 42
         $dm = $eventArgs->getDocumentManager();
43 43
         $dm->createQueryBuilder('Cv\Entity\Cv')
44
-           ->update()->multiple(true)
45
-           ->field('attachments')->equals($fileId)->pull($fileId)
46
-           ->getQuery()->execute();
44
+            ->update()->multiple(true)
45
+            ->field('attachments')->equals($fileId)->pull($fileId)
46
+            ->getQuery()->execute();
47 47
     }
48 48
 }
Please login to merge, or discard this patch.
module/Cv/src/Cv/Entity/Attachment.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,6 +31,6 @@
 block discarded – undo
31 31
      */
32 32
     public function getUri()
33 33
     {
34
-        return "/file/Cv.Attachment/" . $this->id . "/" .urlencode($this->name);
34
+        return "/file/Cv.Attachment/".$this->id."/".urlencode($this->name);
35 35
     }
36 36
 }
Please login to merge, or discard this patch.
module/Cv/src/Cv/Repository/Cv.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
      * Look for an drafted Document of a given user
23 23
      *
24 24
      * @param $user
25
-     * @return CvEntity|null
25
+     * @return \MongoCursor
26 26
      */
27 27
     public function findDraft($user)
28 28
     {
Please login to merge, or discard this patch.
module/Cv/src/Cv/Controller/ViewController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
         $resume = $this->repository->find($id);
42 42
 
43 43
         if (!$resume) {
44
-            throw new \Exception('No resume found with id ' . $id);
44
+            throw new \Exception('No resume found with id '.$id);
45 45
         }
46 46
 
47 47
         /* @todo REMOVE THIS
Please login to merge, or discard this patch.