@@ -20,7 +20,7 @@ |
||
20 | 20 | */ |
21 | 21 | public static function searchAndReplace($search, $replace, $haystack) |
22 | 22 | { |
23 | - $callback = function (&$value, $key, array $params) { |
|
23 | + $callback = function(&$value, $key, array $params) { |
|
24 | 24 | if ($params['search'] === $value) { |
25 | 25 | $value = $params['replace']; |
26 | 26 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | private function prepareValidateType($key) |
64 | 64 | { |
65 | 65 | $key = str_replace('|', '', $key); |
66 | - $method = 'validate'.ucfirst($key); |
|
66 | + $method = 'validate' . ucfirst($key); |
|
67 | 67 | if (!method_exists(self::class, $method)) { |
68 | 68 | throw new EntityFieldsException( |
69 | 69 | sprintf('Internal error: the field "%s" doesn\'t match any of the entity predefined fields', $key) |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | private function validateRequired($key, $value) |
85 | 85 | { |
86 | 86 | if (('add' === $this->action) || ('update' === $this->action)) { |
87 | - if (null === $value && (true === $this->fieldsParams[$key]['required_'.$this->action])) { |
|
87 | + if (null === $value && (true === $this->fieldsParams[$key]['required_' . $this->action])) { |
|
88 | 88 | throw new EntityFieldsException(sprintf('%s error: the required field "%s" is missing or empty', ucfirst($this->action), $key)); |
89 | 89 | } |
90 | 90 | } |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | */ |
105 | 105 | private static function validateInt($key, $value) |
106 | 106 | { |
107 | - if (!is_int($value) || !preg_match('/^\d+$/', (string) $value)) { |
|
107 | + if (!is_int($value) || !preg_match('/^\d+$/', (string)$value)) { |
|
108 | 108 | throw new EntityFieldsException(sprintf('The field "%s" must contain digits only', $key)); |
109 | 109 | } |
110 | 110 |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | if (!empty($params)) { |
45 | 45 | $query = '?'; |
46 | 46 | foreach ($params as $key => $param) { |
47 | - $query .= $key.'='.$param; |
|
47 | + $query .= $key . '=' . $param; |
|
48 | 48 | |
49 | 49 | if ($param !== end($params)) { |
50 | 50 | $query .= '&'; |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | } |
53 | 53 | } |
54 | 54 | |
55 | - return $host.$path.$query; |
|
55 | + return $host . $path . $query; |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | /** |
@@ -62,6 +62,6 @@ discard block |
||
62 | 62 | */ |
63 | 63 | private function makeUserHost($subdomain) |
64 | 64 | { |
65 | - return $this->settings->getScheme().'://'.$subdomain.'.'.$this->settings->getDomain(); |
|
65 | + return $this->settings->getScheme() . '://' . $subdomain . '.' . $this->settings->getDomain(); |
|
66 | 66 | } |
67 | 67 | } |