@@ -27,10 +27,10 @@ discard block |
||
| 27 | 27 | { |
| 28 | 28 | $qb = $this->createQueryBuilder(); |
| 29 | 29 | $qb->hydrate(true) |
| 30 | - ->select('entity') |
|
| 31 | - ->field('sourceId')->equals($jobEntity->id) |
|
| 32 | - ->sort('dateCreated', 'desc') |
|
| 33 | - ->limit(1); |
|
| 30 | + ->select('entity') |
|
| 31 | + ->field('sourceId')->equals($jobEntity->id) |
|
| 32 | + ->sort('dateCreated', 'desc') |
|
| 33 | + ->limit(1); |
|
| 34 | 34 | |
| 35 | 35 | $result = $qb->getQuery()->execute(); |
| 36 | 36 | if ($result->count() == 0) { |
@@ -53,9 +53,9 @@ discard block |
||
| 53 | 53 | // So we need to create a cursor, that skips the first Document |
| 54 | 54 | $qb = $this->createQueryBuilder(); |
| 55 | 55 | $qb->hydrate(false) |
| 56 | - ->select('entity') |
|
| 57 | - ->field('sourceId')->equals($jobEntity->id) |
|
| 58 | - ->sort('dateCreated', 'desc'); |
|
| 56 | + ->select('entity') |
|
| 57 | + ->field('sourceId')->equals($jobEntity->id) |
|
| 58 | + ->sort('dateCreated', 'desc'); |
|
| 59 | 59 | $result = $qb->getQuery()->execute()->skip(1); |
| 60 | 60 | foreach ($result as $item) { |
| 61 | 61 | $id = $item['_id']; |
@@ -127,7 +127,7 @@ |
||
| 127 | 127 | |
| 128 | 128 | public function process($token, $organizationId) |
| 129 | 129 | { |
| 130 | - $organizationRepository = $this->getOrganizationRepository(); |
|
| 130 | + $organizationRepository = $this->getOrganizationRepository(); |
|
| 131 | 131 | $organization = $organizationRepository->find($organizationId); /* @var $organization \Organizations\Entity\OrganizationInterface */ |
| 132 | 132 | |
| 133 | 133 | if (!$organization) { |
@@ -27,13 +27,13 @@ |
||
| 27 | 27 | * |
| 28 | 28 | * @var int |
| 29 | 29 | */ |
| 30 | - const JOBS_VIEW = 16; // 10000 |
|
| 31 | - const JOBS_CREATE = 24; // 11000 # Create w/o View makes no sense |
|
| 32 | - const JOBS_CHANGE = 20; // 10100 # Change w/o view makes no sense |
|
| 33 | - const APPLICATIONS_VIEW = 2; // 00010 |
|
| 34 | - const APPLICATIONS_CHANGE = 3; // 00011 # change w/o view makes no sense |
|
| 35 | - const ALL = 31; // 11111 |
|
| 36 | - const NONE = 0; // 00000 |
|
| 30 | + const JOBS_VIEW = 16; // 10000 |
|
| 31 | + const JOBS_CREATE = 24; // 11000 # Create w/o View makes no sense |
|
| 32 | + const JOBS_CHANGE = 20; // 10100 # Change w/o view makes no sense |
|
| 33 | + const APPLICATIONS_VIEW = 2; // 00010 |
|
| 34 | + const APPLICATIONS_CHANGE = 3; // 00011 # change w/o view makes no sense |
|
| 35 | + const ALL = 31; // 11111 |
|
| 36 | + const NONE = 0; // 00000 |
|
| 37 | 37 | /**#@- */ |
| 38 | 38 | |
| 39 | 39 | /** |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | public function getHydrator() |
| 25 | 25 | { |
| 26 | 26 | if (!$this->hydrator) { |
| 27 | - $hydrator = new EntityHydrator(); |
|
| 27 | + $hydrator = new EntityHydrator(); |
|
| 28 | 28 | $this->setHydrator($hydrator); |
| 29 | 29 | } |
| 30 | 30 | return $this->hydrator; |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | |
| 41 | 41 | if ($document instanceof UserInterface) { |
| 42 | 42 | $repository = $args->getDocumentManager()->getRepository('Organizations\Entity\Organization'); |
| 43 | - $userId = $document->getId(); |
|
| 43 | + $userId = $document->getId(); |
|
| 44 | 44 | $reference = new OrganizationReference($userId, $repository); |
| 45 | 45 | |
| 46 | 46 | $document->setOrganization($reference); |
@@ -102,7 +102,7 @@ |
||
| 102 | 102 | $fieldset->setLabel(ucfirst($label)); |
| 103 | 103 | } |
| 104 | 104 | $fieldset->setName($name) |
| 105 | - ->setObject($child); |
|
| 105 | + ->setObject($child); |
|
| 106 | 106 | |
| 107 | 107 | |
| 108 | 108 | $this->add($fieldset); |
@@ -74,10 +74,10 @@ discard block |
||
| 74 | 74 | |
| 75 | 75 | $inputLabel = isset($this->labelMap[$inputName]) ? $this->labelMap[$inputName] : $inputName; |
| 76 | 76 | |
| 77 | - if (is_array($inputLabel)){ |
|
| 78 | - $priority = isset($inputLabel[1])?$inputLabel[1]:0; |
|
| 77 | + if (is_array($inputLabel)) { |
|
| 78 | + $priority = isset($inputLabel[1]) ? $inputLabel[1] : 0; |
|
| 79 | 79 | $inputLabel = $inputLabel[0]; |
| 80 | - }else{ |
|
| 80 | + } else { |
|
| 81 | 81 | $priority = 0; |
| 82 | 82 | } |
| 83 | 83 | |
@@ -89,19 +89,19 @@ discard block |
||
| 89 | 89 | ), |
| 90 | 90 | ); |
| 91 | 91 | if (is_bool($value)) { |
| 92 | - $input['type']= 'Checkbox'; |
|
| 92 | + $input['type'] = 'Checkbox'; |
|
| 93 | 93 | $input['attributes']['checked'] = $value; |
| 94 | 94 | } else { |
| 95 | 95 | $input['attributes']['value'] = $value; |
| 96 | 96 | } |
| 97 | - $this->add($input,['priority'=>$priority]); |
|
| 97 | + $this->add($input, ['priority'=>$priority]); |
|
| 98 | 98 | |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | foreach ($children as $name => $child) { |
| 102 | 102 | $objectClass = ltrim(get_class($settings), '\\'); |
| 103 | 103 | $moduleName = substr($objectClass, 0, strpos($objectClass, '\\')); |
| 104 | - $fieldsetName = $moduleName . '/' . ucfirst($name) . 'SettingsFieldset'; |
|
| 104 | + $fieldsetName = $moduleName.'/'.ucfirst($name).'SettingsFieldset'; |
|
| 105 | 105 | |
| 106 | 106 | if ($this->formManager->has($fieldsetName)) { |
| 107 | 107 | $fieldset = $this->formManager->get($fieldsetName); |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | if (is_array($inputLabel)){ |
| 78 | 78 | $priority = isset($inputLabel[1])?$inputLabel[1]:0; |
| 79 | 79 | $inputLabel = $inputLabel[0]; |
| 80 | - }else{ |
|
| 80 | + } else{ |
|
| 81 | 81 | $priority = 0; |
| 82 | 82 | } |
| 83 | 83 | |
@@ -26,11 +26,11 @@ |
||
| 26 | 26 | // 'driver' => 'odm_default', |
| 27 | 27 | // |
| 28 | 28 | // 'generate_proxies' => true, |
| 29 | - 'proxy_dir' => 'cache/DoctrineMongoODMModule/Proxy', |
|
| 29 | + 'proxy_dir' => 'cache/DoctrineMongoODMModule/Proxy', |
|
| 30 | 30 | // 'proxy_namespace' => 'DoctrineMongoODMModule\Proxy', |
| 31 | 31 | // |
| 32 | 32 | // 'generate_hydrators' => true, |
| 33 | - 'hydrator_dir' => 'cache/DoctrineMongoODMModule/Hydrator', |
|
| 33 | + 'hydrator_dir' => 'cache/DoctrineMongoODMModule/Hydrator', |
|
| 34 | 34 | // 'hydrator_namespace' => 'DoctrineMongoODMModule\Hydrator', |
| 35 | 35 | // |
| 36 | 36 | // 'default_db' => '', |
@@ -380,10 +380,10 @@ |
||
| 380 | 380 | return $this; |
| 381 | 381 | } |
| 382 | 382 | |
| 383 | - /** |
|
| 384 | - * (non-PHPdoc) |
|
| 385 | - * @see \Jobs\Entity\JobInterface::getOrganization() |
|
| 386 | - */ |
|
| 383 | + /** |
|
| 384 | + * (non-PHPdoc) |
|
| 385 | + * @see \Jobs\Entity\JobInterface::getOrganization() |
|
| 386 | + */ |
|
| 387 | 387 | public function getOrganization() |
| 388 | 388 | { |
| 389 | 389 | return $this->organization; |
@@ -536,7 +536,7 @@ |
||
| 536 | 536 | |
| 537 | 537 | /** |
| 538 | 538 | * Gets the number of unread applications |
| 539 | - * @return Collection |
|
| 539 | + * @return integer |
|
| 540 | 540 | */ |
| 541 | 541 | public function getUnreadApplications() |
| 542 | 542 | { |
@@ -513,10 +513,10 @@ discard block |
||
| 513 | 513 | public function getLocation() |
| 514 | 514 | { |
| 515 | 515 | if (null === $this->location) { |
| 516 | - $array=[]; |
|
| 517 | - if(null != $this->locations){ |
|
| 516 | + $array = []; |
|
| 517 | + if (null != $this->locations) { |
|
| 518 | 518 | foreach ($this->locations as $location) { /* @var \Core\Entity\LocationInterface $location */ |
| 519 | - $array[]=(string) $location; |
|
| 519 | + $array[] = (string) $location; |
|
| 520 | 520 | } |
| 521 | 521 | return implode(', ', $array); |
| 522 | 522 | } |
@@ -571,7 +571,7 @@ discard block |
||
| 571 | 571 | if ($removePermissions) { |
| 572 | 572 | $this->getPermissions()->revoke($this->user, Permissions::PERMISSION_ALL); |
| 573 | 573 | } |
| 574 | - $this->user=null; |
|
| 574 | + $this->user = null; |
|
| 575 | 575 | } |
| 576 | 576 | |
| 577 | 577 | return $this; |
@@ -579,8 +579,8 @@ discard block |
||
| 579 | 579 | |
| 580 | 580 | public function unsetOrganization($removePermissions = true) |
| 581 | 581 | { |
| 582 | - if($this->organization && $removePermissions){ |
|
| 583 | - $this->getPermissions()->revoke($this->organization,Permissions::PERMISSION_ALL); |
|
| 582 | + if ($this->organization && $removePermissions) { |
|
| 583 | + $this->getPermissions()->revoke($this->organization, Permissions::PERMISSION_ALL); |
|
| 584 | 584 | } |
| 585 | 585 | |
| 586 | 586 | $this->organization = null; |
@@ -832,7 +832,7 @@ discard block |
||
| 832 | 832 | $organization = $this->organization; |
| 833 | 833 | if (is_object($organization) && $organization->getImage()) { |
| 834 | 834 | $organizationImage = $organization->getImage(); |
| 835 | - return "/file/Organizations.OrganizationImage/" . $organizationImage->getId(); |
|
| 835 | + return "/file/Organizations.OrganizationImage/".$organizationImage->getId(); |
|
| 836 | 836 | } |
| 837 | 837 | return $this->logoRef; |
| 838 | 838 | } |
@@ -60,9 +60,9 @@ |
||
| 60 | 60 | protected function addButtonsFieldset() |
| 61 | 61 | { |
| 62 | 62 | $this->add( |
| 63 | - array( |
|
| 64 | - 'type' => 'Jobs/MultipostButtonFieldset' |
|
| 65 | - ) |
|
| 63 | + array( |
|
| 64 | + 'type' => 'Jobs/MultipostButtonFieldset' |
|
| 65 | + ) |
|
| 66 | 66 | ); |
| 67 | 67 | } |
| 68 | 68 | } |