@@ -146,18 +146,18 @@ |
||
| 146 | 146 | $size = $this->getLength(); |
| 147 | 147 | |
| 148 | 148 | if ($size >= 1073741824) { |
| 149 | - return round($size / 1073741824, 2) . ' GB'; |
|
| 149 | + return round($size / 1073741824, 2).' GB'; |
|
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | if ($size >= 1048576) { |
| 153 | - return round($size / 1048576, 2) . ' MB'; |
|
| 153 | + return round($size / 1048576, 2).' MB'; |
|
| 154 | 154 | } |
| 155 | 155 | |
| 156 | 156 | if ($size >= 1024) { |
| 157 | - return round($size / 1024, 2) . ' kB'; |
|
| 157 | + return round($size / 1024, 2).' kB'; |
|
| 158 | 158 | } |
| 159 | 159 | |
| 160 | - return (string)$size; |
|
| 160 | + return (string) $size; |
|
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | /** |
@@ -36,16 +36,16 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -66,7 +66,7 @@ |
||
| 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 | } |
@@ -84,7 +84,7 @@ discard block |
||
| 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 |
||
| 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); |
@@ -48,7 +48,7 @@ discard block |
||
| 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 |
||
| 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 | |
@@ -45,7 +45,7 @@ |
||
| 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 | } |
@@ -91,7 +91,7 @@ |
||
| 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 | |
@@ -53,7 +53,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -30,12 +30,12 @@ |
||
| 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, |