@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | private function load_by_properties(array $properties) |
| 55 | 55 | { |
| 56 | - if ( !array_key_exists('authtype', $properties) |
|
| 56 | + if (!array_key_exists('authtype', $properties) |
|
| 57 | 57 | || !array_key_exists('login', $properties)) { |
| 58 | 58 | throw exception::invalid_property_value(); |
| 59 | 59 | } |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | |
| 97 | 97 | public function &get_person() : person |
| 98 | 98 | { |
| 99 | - if ( $this->person_object === null |
|
| 99 | + if ($this->person_object === null |
|
| 100 | 100 | && $this->person !== null) { |
| 101 | 101 | $this->person_object = connection::get_em()->getRepository('midgard:midgard_person')->findOneBy(['guid' => $this->person]); |
| 102 | 102 | } |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | |
| 106 | 106 | public function create() : bool |
| 107 | 107 | { |
| 108 | - if ( empty($this->authtype) |
|
| 108 | + if (empty($this->authtype) |
|
| 109 | 109 | || !empty($this->id)) { |
| 110 | 110 | exception::invalid_property_value(); |
| 111 | 111 | return false; |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | |
| 170 | 170 | protected function is_unique() : bool |
| 171 | 171 | { |
| 172 | - if ( empty($this->login) |
|
| 172 | + if (empty($this->login) |
|
| 173 | 173 | || empty($this->authtype)) { |
| 174 | 174 | return true; |
| 175 | 175 | } |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | |
| 29 | 29 | public function read_file_at_path($path) : bool |
| 30 | 30 | { |
| 31 | - if ( !file_exists($path) |
|
| 31 | + if (!file_exists($path) |
|
| 32 | 32 | || !is_readable($path)) { |
| 33 | 33 | return false; |
| 34 | 34 | } |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | $subdirs = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'A', 'B', 'C', 'D', 'E', 'F']; |
| 125 | 125 | foreach ($subdirs as $dir) { |
| 126 | 126 | foreach ($subdirs as $subdir) { |
| 127 | - if ( !is_dir($this->blobdir . '/' . $dir . '/' . $subdir) |
|
| 127 | + if (!is_dir($this->blobdir . '/' . $dir . '/' . $subdir) |
|
| 128 | 128 | && !mkdir($this->blobdir . '/' . $dir . '/' . $subdir, 0777, true)) { |
| 129 | 129 | return false; |
| 130 | 130 | } |