@@ -77,6 +77,9 @@ discard block |
||
77 | 77 | return $return === $entity ? $this : $return; |
78 | 78 | } |
79 | 79 | |
80 | + /** |
|
81 | + * @param string $method |
|
82 | + */ |
|
80 | 83 | protected function proxyClone($method, ...$args) |
81 | 84 | { |
82 | 85 | $value = $this->proxy($method, ...$args); |
@@ -85,6 +88,9 @@ discard block |
||
85 | 88 | return $return; |
86 | 89 | } |
87 | 90 | |
91 | + /** |
|
92 | + * @param string $property |
|
93 | + */ |
|
88 | 94 | protected function inaccessible($property) |
89 | 95 | { |
90 | 96 | throw new \DomainException(sprintf( |
@@ -93,6 +99,9 @@ discard block |
||
93 | 99 | )); |
94 | 100 | } |
95 | 101 | |
102 | + /** |
|
103 | + * @param string $property |
|
104 | + */ |
|
96 | 105 | protected function immutable($property) |
97 | 106 | { |
98 | 107 | throw new ImmutablePropertyException($property, $this); |
@@ -33,7 +33,7 @@ |
||
33 | 33 | public function __construct(EntityInterface $source) |
34 | 34 | { |
35 | 35 | $this->snapshotMeta = new SnapshotMeta(); |
36 | - $this->snapshotEntity = $source; |
|
36 | + $this->snapshotEntity = $source; |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | public function getOriginalEntity() |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | public function __invoke(Job $jobEntity, $options = [], $urlParams = []) |
69 | 69 | { |
70 | 70 | |
71 | - $options= array_merge($this->options, $options); |
|
71 | + $options = array_merge($this->options, $options); |
|
72 | 72 | $paramsHelper = $this->paramsHelper; |
73 | 73 | $urlHelper = $this->urlHelper; |
74 | 74 | $serverUrlHelper = $this->serverUrlHelper; |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | if (!empty($jobEntity->getLink())) { |
78 | 78 | $url = $jobEntity->getLink(); |
79 | 79 | $isExternalLink = true; |
80 | - }elseif($options['showPendingJobs']) { |
|
80 | + }elseif ($options['showPendingJobs']) { |
|
81 | 81 | $url = $urlHelper( |
82 | 82 | 'lang/jobs/approval', |
83 | 83 | [], |
@@ -87,10 +87,10 @@ discard block |
||
87 | 87 | ] |
88 | 88 | ], true); |
89 | 89 | |
90 | - }else{ |
|
90 | + } else { |
|
91 | 91 | |
92 | 92 | $query = [ |
93 | - 'subscriberUri' => $serverUrlHelper([]) . '/subscriber/' . 1, |
|
93 | + 'subscriberUri' => $serverUrlHelper([]).'/subscriber/'.1, |
|
94 | 94 | 'id' => $jobEntity->getId() |
95 | 95 | ]; |
96 | 96 | if ($jobEntity instanceOf JobSnapshot) { |
@@ -107,16 +107,16 @@ discard block |
||
107 | 107 | $url = $urlHelper($route, $params, array('query' => $query)); |
108 | 108 | } |
109 | 109 | |
110 | - if ($options['linkOnly']){ |
|
110 | + if ($options['linkOnly']) { |
|
111 | 111 | $result = $url; |
112 | - if ($options['absolute'] && !$isExternalLink){ |
|
112 | + if ($options['absolute'] && !$isExternalLink) { |
|
113 | 113 | $result = $serverUrlHelper($url); |
114 | 114 | } |
115 | - }else{ |
|
115 | + } else { |
|
116 | 116 | $result = sprintf('<a href="%s" rel="%s" %s>%s</a>', |
117 | 117 | $url, |
118 | 118 | $options['rel'], |
119 | - $options['target']?"target=" . $options['target']:"", |
|
119 | + $options['target'] ? "target=".$options['target'] : "", |
|
120 | 120 | strip_tags($jobEntity->getTitle())); |
121 | 121 | } |
122 | 122 | |
@@ -126,10 +126,10 @@ discard block |
||
126 | 126 | /** |
127 | 127 | * @param $options |
128 | 128 | */ |
129 | - public function setOptions($options){ |
|
130 | - foreach($options as $key=>$val) { |
|
131 | - if (array_key_exists($this->options,$key)) { |
|
132 | - $this->options[$key]=$val; |
|
129 | + public function setOptions($options) { |
|
130 | + foreach ($options as $key=>$val) { |
|
131 | + if (array_key_exists($this->options, $key)) { |
|
132 | + $this->options[$key] = $val; |
|
133 | 133 | } |
134 | 134 | } |
135 | 135 | } |
@@ -188,12 +188,12 @@ |
||
188 | 188 | public function findLatest($sourceId, $isDraft = false) |
189 | 189 | { |
190 | 190 | return $this->createQueryBuilder() |
191 | - ->field('snapshotEntity')->equals(new \MongoId($sourceId)) |
|
192 | - ->field('snapshotMeta.isDraft')->equals($isDraft) |
|
193 | - ->sort('snapshotMeta.dateCreated.date', 'desc') |
|
194 | - ->limit(1) |
|
195 | - ->getQuery() |
|
196 | - ->getSingleResult(); |
|
191 | + ->field('snapshotEntity')->equals(new \MongoId($sourceId)) |
|
192 | + ->field('snapshotMeta.isDraft')->equals($isDraft) |
|
193 | + ->sort('snapshotMeta.dateCreated.date', 'desc') |
|
194 | + ->limit(1) |
|
195 | + ->getQuery() |
|
196 | + ->getSingleResult(); |
|
197 | 197 | |
198 | 198 | } |
199 | 199 |
@@ -66,13 +66,13 @@ discard block |
||
66 | 66 | $region = $this->getRegion(); |
67 | 67 | |
68 | 68 | $str = ''; |
69 | - if ($postalCode) { $str .= $postalCode . ' '; } |
|
69 | + if ($postalCode) { $str .= $postalCode.' '; } |
|
70 | 70 | if ($city) { $str .= $city; } |
71 | - if ($region) { $str .= ', ' . $region; } |
|
72 | - if ($country) { $str .= ', ' . $country; } |
|
71 | + if ($region) { $str .= ', '.$region; } |
|
72 | + if ($country) { $str .= ', '.$country; } |
|
73 | 73 | if ($coords) { |
74 | 74 | $coords = $coords->getCoordinates(); |
75 | - $str .= ' ( ' . join(', ', $coords) . ' )'; |
|
75 | + $str .= ' ( '.join(', ', $coords).' )'; |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | return $str; |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | if (!$value) { continue; } |
108 | 108 | |
109 | 109 | if ('coordinates' == $key) { |
110 | - $class = '\\Geo\\Entity\\Geometry\\' . $value['type']; |
|
110 | + $class = '\\Geo\\Entity\\Geometry\\'.$value['type']; |
|
111 | 111 | $value = new $class($value['coordinates']); |
112 | 112 | } |
113 | 113 |