@@ -63,9 +63,9 @@ discard block |
||
63 | 63 | [ |
64 | 64 | [StatusInterface::INCOMING, StatusInterface::INCOMING], |
65 | 65 | [StatusInterface::ACCEPTED, StatusInterface::ACCEPTED], |
66 | - [StatusInterface::CONFIRMED,StatusInterface::CONFIRMED], |
|
66 | + [StatusInterface::CONFIRMED, StatusInterface::CONFIRMED], |
|
67 | 67 | [StatusInterface::INQUIRY, StatusInterface::INQUIRY], |
68 | - [StatusInterface::INVITED, StatusInterface::INVITED], |
|
68 | + [StatusInterface::INVITED, StatusInterface::INVITED], |
|
69 | 69 | [StatusInterface::REJECTED, StatusInterface::REJECTED], |
70 | 70 | |
71 | 71 | ]; |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | */ |
100 | 100 | public function testGetUnknownStatus() |
101 | 101 | { |
102 | - $expected="foobar"; |
|
102 | + $expected = "foobar"; |
|
103 | 103 | $status = new Status("unknown status"); |
104 | 104 | $this->assertEquals($status->getOrder(), $expected); |
105 | 105 | } |
@@ -50,7 +50,7 @@ |
||
50 | 50 | $userChanged = isset($changeset['user']) && $changeset['user'][0] !== $changeset['user'][1]; |
51 | 51 | $managersChanged = |
52 | 52 | //!$document instanceof JobSnapshot |
53 | - isset($changeset['metaData']) |
|
53 | + isset($changeset['metaData']) |
|
54 | 54 | && (isset($changeset['metaData'][1]['organizations:managers']) |
55 | 55 | || isset($changeset['metaData'][0]['organizations:managers'])) |
56 | 56 | ; |
@@ -41,7 +41,7 @@ |
||
41 | 41 | 'userId' => ($user = $job->getUser()) ? $user->getId() : null, |
42 | 42 | ); |
43 | 43 | $managers = array_filter(array_unique(array_map( |
44 | - function ($x) { |
|
44 | + function($x) { |
|
45 | 45 | return $x['id'] ?? false; |
46 | 46 | }, |
47 | 47 | $job->getMetaData('organizations:managers', []) |
@@ -28,7 +28,7 @@ |
||
28 | 28 | $finder = Finder::create() |
29 | 29 | ->name('*.module.php') |
30 | 30 | ->in(__DIR__.'/autoload'); |
31 | -foreach($finder->files() as $file){ |
|
31 | +foreach ($finder->files() as $file) { |
|
32 | 32 | $modules = array_merge($modules, include $file); |
33 | 33 | } |
34 | 34 |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | $this->options = array_intersect_key($new, $this->options); |
58 | 58 | } |
59 | 59 | |
60 | - public function toJsonLd($default=[]) |
|
60 | + public function toJsonLd($default = []) |
|
61 | 61 | { |
62 | 62 | $organization = $this->job->getOrganization(); |
63 | 63 | $organizationName = $organization ? $organization->getOrganizationName()->getName() : $this->job->getCompany(); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | 'hiringOrganization' => [ |
88 | 88 | '@type' => 'Organization', |
89 | 89 | 'name' => $organizationName, |
90 | - 'logo' => $logo ? rtrim($this->options['server_url'], '/') . $logo : '', |
|
90 | + 'logo' => $logo ? rtrim($this->options['server_url'], '/').$logo : '', |
|
91 | 91 | ], |
92 | 92 | 'jobLocation' => $this->getLocations($this->job->getLocations()), |
93 | 93 | 'employmentType' => $this->job->getClassifications()->getEmploymentTypes()->getValues(), |
@@ -107,10 +107,10 @@ discard block |
||
107 | 107 | private function getLogo() { |
108 | 108 | $organization = $this->job->getOrganization(); |
109 | 109 | |
110 | - if( |
|
110 | + if ( |
|
111 | 111 | is_null($organization) |
112 | 112 | || is_null($image = $organization->getImages()->get(ImageSet::THUMBNAIL)) |
113 | - ){ |
|
113 | + ) { |
|
114 | 114 | return $this->job->getLogoRef(); |
115 | 115 | } |
116 | 116 | return $image->getUri(); |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | */ |
126 | 126 | private function getLocations($locations) |
127 | 127 | { |
128 | - $array=[]; |
|
128 | + $array = []; |
|
129 | 129 | foreach ($locations as $location) { /* @var \Core\Entity\LocationInterface $location */ |
130 | 130 | array_push( |
131 | 131 | $array, |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | '@type' => 'Place', |
134 | 134 | 'address' => [ |
135 | 135 | '@type' => 'PostalAddress', |
136 | - 'streetAddress' => $location->getStreetname() .' '.$location->getStreetnumber(), |
|
136 | + 'streetAddress' => $location->getStreetname().' '.$location->getStreetnumber(), |
|
137 | 137 | 'postalCode' => $location->getPostalCode(), |
138 | 138 | 'addressLocality' => $location->getCity(), |
139 | 139 | 'addressCountry' => $location->getCountry(), |
@@ -157,9 +157,9 @@ discard block |
||
157 | 157 | $html = $values->getHtml(); |
158 | 158 | |
159 | 159 | if ($html) { |
160 | - $description=sprintf("%s", $values->getHtml() ); |
|
160 | + $description = sprintf("%s", $values->getHtml()); |
|
161 | 161 | } else { |
162 | - $description=sprintf( |
|
162 | + $description = sprintf( |
|
163 | 163 | "<p>%s</p>". |
164 | 164 | "<h1>%s</h1>". |
165 | 165 | "<h3>Requirements</h3><p>%s</p>". |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | ]; |
198 | 198 | } |
199 | 199 | |
200 | - private function getDefault(){ |
|
200 | + private function getDefault() { |
|
201 | 201 | return [ |
202 | 202 | '@context'=>'http://schema.org/', |
203 | 203 | '@type' => 'JobPosting', |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | public function __call($name, $args) |
57 | 57 | { |
58 | 58 | $args = array_map( |
59 | - function ($item) { |
|
59 | + function($item) { |
|
60 | 60 | if (is_object($item)) { return 'object'; } |
61 | 61 | return $item; |
62 | 62 | }, |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | ->willReturn($jobRepo); |
80 | 80 | $event->expects($this->exactly(2)) |
81 | 81 | ->method('getParam') |
82 | - ->withConsecutive(['days',80],['limit', 0]) |
|
82 | + ->withConsecutive(['days', 80], ['limit', 0]) |
|
83 | 83 | ->willReturnOnConsecutiveCalls(30, 10) |
84 | 84 | ; |
85 | 85 |
@@ -77,13 +77,13 @@ discard block |
||
77 | 77 | $imageSetID = $organization->getImages()->getId(); |
78 | 78 | $images = $imageSet->createImages($options->getImages(), $data); |
79 | 79 | |
80 | - if(!is_dir($tmpDir)){ |
|
80 | + if (!is_dir($tmpDir)) { |
|
81 | 81 | mkdir($tmpDir, 0777, true); |
82 | 82 | } |
83 | 83 | |
84 | 84 | $organization->getImages()->clear(); |
85 | - foreach($images as $key => $image){ |
|
86 | - $name = $key.'-'. $data['name']; |
|
85 | + foreach ($images as $key => $image) { |
|
86 | + $name = $key.'-'.$data['name']; |
|
87 | 87 | $format = str_replace('image/', '', $data['type']); |
88 | 88 | $content = $image->get($format); |
89 | 89 | $tmpFile = $tmpDir.DIRECTORY_SEPARATOR.md5($image->get($format)); |
@@ -94,12 +94,12 @@ discard block |
||
94 | 94 | $metadata->setOrganization($organization); |
95 | 95 | $metadata->setKey($key); |
96 | 96 | $metadata->setContentType($data['type']); |
97 | - if(!is_null($user)){ |
|
97 | + if (!is_null($user)) { |
|
98 | 98 | $metadata->setUser($user); |
99 | 99 | } |
100 | 100 | |
101 | 101 | /* @var ImageInterface $file */ |
102 | - $file = $fileManager->uploadFromFile($options->getEntityClass(),$metadata, $tmpFile, $name); |
|
102 | + $file = $fileManager->uploadFromFile($options->getEntityClass(), $metadata, $tmpFile, $name); |
|
103 | 103 | $organization->getImages()->add($file); |
104 | 104 | } |
105 | 105 |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $attachment = $this->doUploadFile($application, $info); |
89 | 89 | |
90 | 90 | // remove existing image |
91 | - if(!is_null($application->getContact()->getImage())){ |
|
91 | + if (!is_null($application->getContact()->getImage())) { |
|
92 | 92 | $image = $application->getContact()->getImage(); |
93 | 93 | $application->getContact()->setImage(null); |
94 | 94 | $dm->remove($image); |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | $metadata->setContentType($info['type']); |
117 | 117 | $metadata->setName($info['name']); |
118 | 118 | |
119 | - if(!is_null($user)){ |
|
119 | + if (!is_null($user)) { |
|
120 | 120 | $this->dm->persist($user); |
121 | 121 | } |
122 | 122 | return $fileManager->uploadFromFile( |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | $name = "\\$namespace\\Entity\\$entityName"; |
39 | 39 | } |
40 | 40 | |
41 | - $repository = $this->dm->getRepository($name); |
|
41 | + $repository = $this->dm->getRepository($name); |
|
42 | 42 | |
43 | 43 | if (!$repository instanceof AbstractRepository) { |
44 | 44 | $eventArgs = new DoctrineMongoODM\Event\EventArgs( |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | |
67 | 67 | public function flush($entity = null, array $options = array()) |
68 | 68 | { |
69 | - if(!is_null($entity)){ |
|
69 | + if (!is_null($entity)) { |
|
70 | 70 | $this->dm->persist($entity); |
71 | 71 | $this->dm->flush(); |
72 | 72 | } |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | && $events->dispatchEvent('postCommit', new EventArgs(array('document' => $entity, 'documentManager' => $this->dm))); |
76 | 76 | } |
77 | 77 | |
78 | - public function remove(EntityInterface $entity, $flush=false) |
|
78 | + public function remove(EntityInterface $entity, $flush = false) |
|
79 | 79 | { |
80 | 80 | $dm = $this->dm; |
81 | 81 | $events = $dm->getEventManager(); |