@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | */ |
| 45 | 45 | public function getUri(?OrganizationImage $image) |
| 46 | 46 | { |
| 47 | - if(is_null($image)){ |
|
| 47 | + if (is_null($image)) { |
|
| 48 | 48 | return null; |
| 49 | 49 | } |
| 50 | 50 | if ($this->options->getEnabled()) { |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | */ |
| 94 | 94 | public function matchUri($uri) |
| 95 | 95 | { |
| 96 | - $pattern = '#^' . preg_quote($this->options->getUriPath(), '#') . '/[0-9a-z]/[0-9a-z]/([0-9a-z]+)\.[a-zA-Z]{3,4}$#'; |
|
| 96 | + $pattern = '#^'.preg_quote($this->options->getUriPath(), '#').'/[0-9a-z]/[0-9a-z]/([0-9a-z]+)\.[a-zA-Z]{3,4}$#'; |
|
| 97 | 97 | $matches = []; |
| 98 | 98 | preg_match($pattern, $uri, $matches); |
| 99 | 99 | |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | { |
| 151 | 151 | $dir = rtrim($dir, '/\\'); |
| 152 | 152 | |
| 153 | - if (! is_dir($dir)) { |
|
| 153 | + if (!is_dir($dir)) { |
|
| 154 | 154 | $this->createDirectoryRecursively(dirname($dir)); |
| 155 | 155 | |
| 156 | 156 | $oldUmask = umask(0); |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | /* @var OrganizationImage $image */ |
| 76 | 76 | $image = $fileManager->findByID(OrganizationImage::class, $id); |
| 77 | 77 | |
| 78 | - if (! $image) { |
|
| 78 | + if (!$image) { |
|
| 79 | 79 | // abort if image does not exist |
| 80 | 80 | return; |
| 81 | 81 | } |
@@ -7,36 +7,36 @@ discard block |
||
| 7 | 7 | |
| 8 | 8 | return array( |
| 9 | 9 | 'hybridauth' => array( |
| 10 | - "Facebook" => array ( |
|
| 10 | + "Facebook" => array( |
|
| 11 | 11 | "enabled" => true, |
| 12 | - "keys" => array ( "id" => $FACEBOOK_APP_ID, "secret" => $FACEBOOK_APP_SECRET ), |
|
| 13 | - "scope" => "email, user_about_me, user_birthday, user_hometown, user_work_history, user_education_history",// optional |
|
| 12 | + "keys" => array("id" => $FACEBOOK_APP_ID, "secret" => $FACEBOOK_APP_SECRET), |
|
| 13 | + "scope" => "email, user_about_me, user_birthday, user_hometown, user_work_history, user_education_history", // optional |
|
| 14 | 14 | "display" => "popup" |
| 15 | 15 | |
| 16 | 16 | ), |
| 17 | - "LinkedIn" => array ( |
|
| 17 | + "LinkedIn" => array( |
|
| 18 | 18 | "enabled" => true, |
| 19 | - "keys" => array ( "id" => $LINKEDIN_APP_ID, "secret" => $LINKEDIN_APP_SECRET ), |
|
| 19 | + "keys" => array("id" => $LINKEDIN_APP_ID, "secret" => $LINKEDIN_APP_SECRET), |
|
| 20 | 20 | "scope" => "r_basicprofile,r_emailaddress" |
| 21 | 21 | ), |
| 22 | 22 | "XING" => array( |
| 23 | 23 | "enabled" => false, |
| 24 | - 'keys' => array ( "key" => '###XING APP KEY###', 'secret' => '### XING APP SECRET ###'), |
|
| 24 | + 'keys' => array("key" => '###XING APP KEY###', 'secret' => '### XING APP SECRET ###'), |
|
| 25 | 25 | "scope" => '' |
| 26 | 26 | ), |
| 27 | 27 | "Github" => array( |
| 28 | 28 | "enabled" => false, |
| 29 | - 'keys' => array ( "id" => '###Your GitHub AppID ###', 'secret' => '###Your GitHub Secret###'), |
|
| 29 | + 'keys' => array("id" => '###Your GitHub AppID ###', 'secret' => '###Your GitHub Secret###'), |
|
| 30 | 30 | "scope" => '' |
| 31 | 31 | ), |
| 32 | 32 | "Google" => array( |
| 33 | 33 | // see http://hybridauth.sourceforge.net/userguide/IDProvider_info_Google.html |
| 34 | 34 | "enabled" => false, |
| 35 | - 'keys' => array ( "id" => '###Your Google Client-ID ###', 'secret' => '###Your GitHub Secret###'), |
|
| 36 | - "scope" => "https://www.googleapis.com/auth/userinfo.profile ". // optional |
|
| 37 | - "https://www.googleapis.com/auth/userinfo.email" , // optional |
|
| 38 | - "access_type" => "offline", // optional |
|
| 39 | - "approval_prompt" => "force", // optional |
|
| 35 | + 'keys' => array("id" => '###Your Google Client-ID ###', 'secret' => '###Your GitHub Secret###'), |
|
| 36 | + "scope" => "https://www.googleapis.com/auth/userinfo.profile ".// optional |
|
| 37 | + "https://www.googleapis.com/auth/userinfo.email", // optional |
|
| 38 | + "access_type" => "offline", // optional |
|
| 39 | + "approval_prompt" => "force", // optional |
|
| 40 | 40 | ), |
| 41 | 41 | |
| 42 | 42 | |
@@ -47,9 +47,9 @@ discard block |
||
| 47 | 47 | ), |
| 48 | 48 | |
| 49 | 49 | 'Auth' => array( |
| 50 | - 'first_login' => array ( |
|
| 51 | - 'role' => '%%role%%', // role set on the first login. |
|
| 52 | - 'auth_suffix' => '%%auth.suffix%%', // an auth suffix is needed, if you plan to add external apps. |
|
| 50 | + 'first_login' => array( |
|
| 51 | + 'role' => '%%role%%', // role set on the first login. |
|
| 52 | + 'auth_suffix' => '%%auth.suffix%%', // an auth suffix is needed, if you plan to add external apps. |
|
| 53 | 53 | ), |
| 54 | 54 | // this allows an external application to use the YAWIK API |
| 55 | 55 | // applications[USERPOSTFIX] => AppKey |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | 'Core/MailServiceOptions' => [ |
| 16 | 16 | 'options' => [ |
| 17 | 17 | 'transportClass' => 'file', |
| 18 | - 'path' => realpath(__DIR__ . '/../../build/mails') |
|
| 18 | + 'path' => realpath(__DIR__.'/../../build/mails') |
|
| 19 | 19 | ], |
| 20 | 20 | ], |
| 21 | 21 | ] |
@@ -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( |