Completed
Push — develop ( 037ef6...a650ad )
by Carsten
06:58
created
module/Jobs/src/Jobs/Controller/ConsoleController.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -36,16 +36,16 @@  discard block
 block discarded – undo
36 36
         }
37 37
 
38 38
         $date = new \DateTime('today');
39
-        $date->sub(new \DateInterval('P' . $days . 'D'));
39
+        $date->sub(new \DateInterval('P'.$days.'D'));
40 40
 
41
-        $query        = [
41
+        $query = [
42 42
             'status.name' => StatusInterface::ACTIVE,
43 43
             'datePublishStart.date' => ['$lt' => $date]
44 44
         ];
45 45
 
46 46
         $offset = 0;
47 47
         if ($limit && false !== strpos($limit, ',')) {
48
-            list($limit,$offset) = explode(',', $limit);
48
+            list($limit, $offset) = explode(',', $limit);
49 49
         }
50 50
 
51 51
         $jobs = $jobsRepo->findBy($query, null, (int) $limit, (int) $offset);
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
56 56
         }
57 57
 
58 58
         if ($info) {
59
-            echo count($jobs) , ' Jobs';
60
-            if ($offset) { echo ' starting from ' . $offset; }
61
-            echo PHP_EOL . PHP_EOL;
59
+            echo count($jobs), ' Jobs';
60
+            if ($offset) { echo ' starting from '.$offset; }
61
+            echo PHP_EOL.PHP_EOL;
62 62
             $this->listExpiredJobs($jobs);
63 63
             return;
64 64
         }
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         
71 71
         echo "$count jobs found, which have to expire ...\n";
72 72
         
73
-        $progress     = new ProgressBar(
73
+        $progress = new ProgressBar(
74 74
             new ConsoleAdapter(
75 75
                 array(
76 76
                 'elements' => array(
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
         /* @var \Jobs\Entity\Job $job */
95 95
         foreach ($jobs as $job) {
96
-            $progress->update($i++, 'Job ' . $i . ' / ' . $count);
96
+            $progress->update($i++, 'Job '.$i.' / '.$count);
97 97
 
98 98
             $job->changeStatus('expired');
99 99
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
         $i            = 0;
123 123
         /* @var Job $job */
124 124
         foreach ($jobs as $job) {
125
-            $progress->update($i++, 'Job ' . $i . ' / ' . $count);
125
+            $progress->update($i++, 'Job '.$i.' / '.$count);
126 126
             
127 127
             $permissions = $job->getPermissions();
128 128
             $user        = $job->getUser();
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
                 continue;
131 131
             }
132 132
             try {
133
-                $group       = $user->getGroup($job->getCompany());
133
+                $group = $user->getGroup($job->getCompany());
134 134
             } catch (\Exception $e) {
135 135
                 continue;
136 136
             }
@@ -169,13 +169,13 @@  discard block
 block discarded – undo
169 169
                 $org = $job->getCompany();
170 170
             }
171 171
             printf(
172
-                '%s   %s   %-30s   %-20s' . PHP_EOL,
172
+                '%s   %s   %-30s   %-20s'.PHP_EOL,
173 173
                 $job->getDatePublishStart()->format('Y-m-d'),
174 174
                 $id,
175 175
                 substr($job->getTitle(), 0, 30),
176 176
                 substr($org, 0, 20)
177 177
             );
178 178
         }
179
-        return count($jobs) . ' Jobs.';
179
+        return count($jobs).' Jobs.';
180 180
     }
181 181
 }
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Entity/History.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -41,6 +41,9 @@
 block discarded – undo
41 41
      */
42 42
     protected $message;
43 43
     
44
+    /**
45
+     * @param StatusInterface|null $status
46
+     */
44 47
     public function __construct($status, $message = '[System]')
45 48
     {
46 49
         if (!$status instanceof StatusInterface) {
Please login to merge, or discard this patch.
Organizations/src/Organizations/ImageFileCache/ApplicationListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
         // try get image from repository
67 67
         $image = $this->repository->find($id);
68 68
 
69
-        if (! $image) {
69
+        if (!$image) {
70 70
             // abort if image does not exist
71 71
             return;
72 72
         }
Please login to merge, or discard this patch.
module/Organizations/src/Organizations/ImageFileCache/Manager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
      */
85 85
     public function matchUri($uri)
86 86
     {
87
-        $pattern = '#^' . preg_quote($this->options->getUriPath(), '#') . '/[0-9a-z]/[0-9a-z]/([0-9a-z]+)\.[a-zA-Z]{3,4}$#';
87
+        $pattern = '#^'.preg_quote($this->options->getUriPath(), '#').'/[0-9a-z]/[0-9a-z]/([0-9a-z]+)\.[a-zA-Z]{3,4}$#';
88 88
         $matches = [];
89 89
         preg_match($pattern, $uri, $matches);
90 90
         
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
     {
121 121
         $dir = rtrim($dir, '/\\');
122 122
         
123
-        if (! is_dir($dir)) {
123
+        if (!is_dir($dir)) {
124 124
             $this->createDirectoryRecursively(dirname($dir));
125 125
             
126 126
             $oldUmask = umask(0);
Please login to merge, or discard this patch.
module/Organizations/src/Organizations/ImageFileCache/ODMListener.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      */
49 49
     public function getSubscribedEvents()
50 50
     {
51
-        if (! $this->manager->isEnabled()) {
51
+        if (!$this->manager->isEnabled()) {
52 52
             return [];
53 53
         }
54 54
         
@@ -66,19 +66,19 @@  discard block
 block discarded – undo
66 66
         $organization = $eventArgs->getDocument();
67 67
         
68 68
         // check for a organization instance
69
-        if (! $organization instanceof Organization) {
69
+        if (!$organization instanceof Organization) {
70 70
             return;
71 71
         }
72 72
         
73 73
         // check if the image has been changed
74
-        if (! $eventArgs->hasChangedField('image')) {
74
+        if (!$eventArgs->hasChangedField('image')) {
75 75
             return;
76 76
         }
77 77
         
78 78
         $image = $eventArgs->getOldValue('image');
79 79
         
80 80
         // check if any image existed
81
-        if (! $image instanceof OrganizationImage) {
81
+        if (!$image instanceof OrganizationImage) {
82 82
             return;
83 83
         }
84 84
         
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
     }
88 88
 
89 89
     /**
90
-     * @param LifecycleEventArgs $eventArgs
90
+     * @param PostFlushEventArgs $eventArgs
91 91
      */
92 92
     public function postFlush(PostFlushEventArgs $eventArgs)
93 93
     {
Please login to merge, or discard this patch.
module/Organizations/src/Organizations/Options/ImageFileCacheOptions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
      */
46 46
     public function __construct($options = null)
47 47
     {
48
-        $this->filePath = __DIR__ . '/../../../../../public' . $this->uriPath;
48
+        $this->filePath = __DIR__.'/../../../../../public'.$this->uriPath;
49 49
         
50 50
         parent::__construct($options);
51 51
     }
Please login to merge, or discard this patch.
src/Core/Repository/DoctrineMongoODM/Event/RepositoryEventsSubscriber.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
      */
92 92
     protected function injectAttachableEntityManager(AttachableEntityInterface $entity)
93 93
     {
94
-        if (! isset($this->attachableEntityManagerPrototype)) {
94
+        if (!isset($this->attachableEntityManagerPrototype)) {
95 95
             $this->attachableEntityManagerPrototype = new AttachableEntityManager($this->services->get('repositories'));
96 96
         }
97 97
         
Please login to merge, or discard this patch.
module/Core/src/Core/Entity/AttachableEntityManager.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     {
54 54
         $className = get_class($entity);
55 55
         
56
-        if (! isset($key)) {
56
+        if (!isset($key)) {
57 57
             $key = $className;
58 58
         }
59 59
         
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         $entityId = $entity->getId();
64 64
         
65 65
         // check if entity is not persisted
66
-        if (! $entityId) {
66
+        if (!$entityId) {
67 67
             // persist entity & retrieve its ID
68 68
             $this->repositories->getRepository($className)->store($entity);
69 69
             $entityId = $entity->getId();
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      */
82 82
     public function getAttachedEntity($key)
83 83
     {
84
-        if (! isset($this->references[$key])) {
84
+        if (!isset($this->references[$key])) {
85 85
             return;
86 86
         }
87 87
         
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         $entity = $this->repositories->getRepository($reference['repository'])
90 90
             ->find($reference['id']);
91 91
         
92
-        if (! $entity) {
92
+        if (!$entity) {
93 93
             // remove reference if entity does not exists
94 94
             unset($this->references[$key]);
95 95
         }
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Controller/ApiJobListByChannelController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,12 +30,12 @@
 block discarded – undo
30 30
     public function listAction()
31 31
     {
32 32
 
33
-        $channel = $this->params()->fromRoute('channel','default');
33
+        $channel = $this->params()->fromRoute('channel', 'default');
34 34
 
35 35
         /* @var Paginator $paginator */
36
-        $paginator = $this->paginator('Jobs/Job', ['channel' => $channel ]);
36
+        $paginator = $this->paginator('Jobs/Job', ['channel' => $channel]);
37 37
 
38
-        $viewModel=new ViewModel();
38
+        $viewModel = new ViewModel();
39 39
         $viewModel->setVariables(
40 40
             [
41 41
                 'jobs' => $paginator,
Please login to merge, or discard this patch.