@@ -24,6 +24,6 @@ |
||
24 | 24 | */ |
25 | 25 | public function isFeatureEnabled() |
26 | 26 | { |
27 | - return (bool) $this->configManager->get(self::CONFIG_DISPLAY_RELEVANT_DATA); |
|
27 | + return (bool)$this->configManager->get(self::CONFIG_DISPLAY_RELEVANT_DATA); |
|
28 | 28 | } |
29 | 29 | } |
@@ -38,13 +38,13 @@ |
||
38 | 38 | $probabilities = $this->configManager->get(Opportunity::PROBABILITIES_CONFIG_KEY); |
39 | 39 | |
40 | 40 | // filter out statuses without probability |
41 | - $probabilities = array_filter($probabilities, function ($probability) { |
|
41 | + $probabilities = array_filter($probabilities, function($probability) { |
|
42 | 42 | return null !== $probability; |
43 | 43 | }); |
44 | 44 | |
45 | 45 | // expose as percents |
46 | 46 | $probabilities = array_map( |
47 | - function ($probability) { |
|
47 | + function($probability) { |
|
48 | 48 | return round($probability * 100); |
49 | 49 | }, |
50 | 50 | $probabilities |
@@ -95,9 +95,9 @@ discard block |
||
95 | 95 | $this->getCreateCustomersData() |
96 | 96 | ); |
97 | 97 | |
98 | - $view->vars['parentClass'] = $options['parent_class']; |
|
98 | + $view->vars['parentClass'] = $options['parent_class']; |
|
99 | 99 | $view->vars['configs']['allowCreateNew'] = ArrayUtil::some( |
100 | - function (array $customer) { |
|
100 | + function(array $customer) { |
|
101 | 101 | return $customer['className'] === Account::class; |
102 | 102 | }, |
103 | 103 | $view->vars['createCustomersData'] |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | |
151 | 151 | $resolver->setDefaults( |
152 | 152 | [ |
153 | - 'configs' => function (Options $options, $value) { |
|
153 | + 'configs' => function(Options $options, $value) { |
|
154 | 154 | return [ |
155 | 155 | 'component' => 'sales-customer', |
156 | 156 | 'renderedPropertyName' => 'text', |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | |
227 | 227 | $result = [ |
228 | 228 | 'createCustomersData' => [], |
229 | - 'hasGridData' => (bool) $this->multiGridProvider->getEntitiesData($customerClasses), |
|
229 | + 'hasGridData' => (bool)$this->multiGridProvider->getEntitiesData($customerClasses), |
|
230 | 230 | ]; |
231 | 231 | |
232 | 232 | foreach ($customerClasses as $class) { |
@@ -46,8 +46,8 @@ |
||
46 | 46 | */ |
47 | 47 | public function cgetAction() |
48 | 48 | { |
49 | - $page = (int) $this->getRequest()->get('page', 1); |
|
50 | - $limit = (int) $this->getRequest()->get('limit', self::ITEMS_PER_PAGE); |
|
49 | + $page = (int)$this->getRequest()->get('page', 1); |
|
50 | + $limit = (int)$this->getRequest()->get('limit', self::ITEMS_PER_PAGE); |
|
51 | 51 | |
52 | 52 | return $this->handleGetListRequest($page, $limit); |
53 | 53 | } |
@@ -60,7 +60,7 @@ |
||
60 | 60 | |
61 | 61 | return new JsonResponse(["id" => ""]); |
62 | 62 | } catch (\Exception $e) { |
63 | - return new JsonResponse(["code" => $e->getCode(), "message"=>$e->getMessage() ], $e->getCode()); |
|
63 | + return new JsonResponse(["code" => $e->getCode(), "message"=>$e->getMessage()], $e->getCode()); |
|
64 | 64 | } |
65 | 65 | } |
66 | 66 |
@@ -55,8 +55,8 @@ |
||
55 | 55 | */ |
56 | 56 | public function cgetAction() |
57 | 57 | { |
58 | - $page = (int) $this->getRequest()->get('page', 1); |
|
59 | - $limit = (int) $this->getRequest()->get('limit', self::ITEMS_PER_PAGE); |
|
58 | + $page = (int)$this->getRequest()->get('page', 1); |
|
59 | + $limit = (int)$this->getRequest()->get('limit', self::ITEMS_PER_PAGE); |
|
60 | 60 | |
61 | 61 | $contactIdFilter = new IdentifierToReferenceFilter($this->getDoctrine(), 'OroContactBundle:Contact'); |
62 | 62 | $filterParameters = [ |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | |
124 | 124 | return new JsonResponse(["id" => ""]); |
125 | 125 | } catch (\Exception $e) { |
126 | - return new JsonResponse(["code" => $e->getCode(), "message"=>$e->getMessage() ], $e->getCode()); |
|
126 | + return new JsonResponse(["code" => $e->getCode(), "message"=>$e->getMessage()], $e->getCode()); |
|
127 | 127 | } |
128 | 128 | } |
129 | 129 | |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | protected function getPreparedItem($entity, $resultFields = []) |
147 | 147 | { |
148 | 148 | $result['id'] = $entity->getId(); |
149 | - $result['owner'] = (string) $entity->getOwner(); |
|
149 | + $result['owner'] = (string)$entity->getOwner(); |
|
150 | 150 | $result['phone'] = $entity->getPhone(); |
151 | 151 | $result['primary'] = $entity->isPrimary(); |
152 | 152 |
@@ -40,7 +40,7 @@ |
||
40 | 40 | { |
41 | 41 | /** @var Lead $lead */ |
42 | 42 | $lead = $this->getLeadManager()->find($leadId); |
43 | - $result = []; |
|
43 | + $result = []; |
|
44 | 44 | |
45 | 45 | if (!empty($lead)) { |
46 | 46 | $items = $lead->getAddresses(); |
@@ -37,7 +37,7 @@ |
||
37 | 37 | $className = ExtendHelper::buildEnumValueClassName(Opportunity::INTERNAL_STATUS_CODE); |
38 | 38 | $openStatus = $this->em->getRepository($className)->find(ExtendHelper::buildEnumValueId('in_progress')); |
39 | 39 | $opportunity = new Opportunity(); |
40 | - $opportunity->setName('name '.$id); |
|
40 | + $opportunity->setName('name ' . $id); |
|
41 | 41 | $opportunity->setStatus($openStatus); |
42 | 42 | $opportunity->setOrganization($this->organization); |
43 | 43 | $this->em->persist($opportunity); |