| @@ -59,7 +59,7 @@ discard block | ||
| 59 | 59 | if (array_key_exists($alias, $array)) | 
| 60 | 60 | $value = $array[$alias]; | 
| 61 | 61 | |
| 62 | - if(!empty($configuration->getType())) | |
| 62 | + if (!empty($configuration->getType())) | |
| 63 | 63 |          { | 
| 64 | 64 | $type = $configuration->getType(); | 
| 65 | 65 | |
| @@ -67,7 +67,7 @@ discard block | ||
| 67 | 67 |              { | 
| 68 | 68 | $value = new $type($value, false); | 
| 69 | 69 | } | 
| 70 | - catch(NoDataFoundException $e) | |
| 70 | + catch (NoDataFoundException $e) | |
| 71 | 71 |              { | 
| 72 | 72 | $value = new $type(); | 
| 73 | 73 | } | 
| @@ -68,7 +68,7 @@ discard block | ||
| 68 | 68 | $this->lazy = $lazy; | 
| 69 | 69 | |
| 70 | 70 | // Se não for lazy load, carrega o objeto | 
| 71 | - if(!$this->lazy) | |
| 71 | + if (!$this->lazy) | |
| 72 | 72 | $this->populate($this->where); | 
| 73 | 73 | } | 
| 74 | 74 | |
| @@ -84,7 +84,7 @@ discard block | ||
| 84 | 84 | public function __call($name, $arg) | 
| 85 | 85 |      { | 
| 86 | 86 | // Carrega o objeto se por lazy load | 
| 87 | - if($this->lazy) | |
| 87 | + if ($this->lazy) | |
| 88 | 88 | $this->populate($this->where); | 
| 89 | 89 | } | 
| 90 | 90 | |
| @@ -101,7 +101,7 @@ discard block | ||
| 101 | 101 |      { | 
| 102 | 102 | // Se for numérico ou string, presume-se | 
| 103 | 103 | // que é uma chave primária. | 
| 104 | - if(is_numeric($param) || is_string($param)) | |
| 104 | + if (is_numeric($param) || is_string($param)) | |
| 105 | 105 |          { | 
| 106 | 106 | $this->populateFromId($param); | 
| 107 | 107 | } | 
| @@ -109,7 +109,7 @@ discard block | ||
| 109 | 109 | // Verifica se é um comando do tipo where | 
| 110 | 110 | // que pode ser usado diretamente como parâmetro | 
| 111 | 111 | // no TableGateway do Zend Framework 2. | 
| 112 | - else if(!is_null($param)) | |
| 112 | + else if (!is_null($param)) | |
| 113 | 113 |          { | 
| 114 | 114 | $this->populateFromWhere($param); | 
| 115 | 115 | } | 
| @@ -126,7 +126,7 @@ discard block | ||
| 126 | 126 | */ | 
| 127 | 127 | private function populateFromId($id) | 
| 128 | 128 |      { | 
| 129 | - if(empty($this->primaryKey)) | |
| 129 | + if (empty($this->primaryKey)) | |
| 130 | 130 | throw new NoPrimaryKeyException(); | 
| 131 | 131 | |
| 132 | 132 | $this->populateFromWhere([$this->primaryKey => $id]); | 
| @@ -145,7 +145,7 @@ discard block | ||
| 145 | 145 |      { | 
| 146 | 146 | $resultSet = $this->tableGateway->select($where); | 
| 147 | 147 | |
| 148 | - if($resultSet->count() == 0) | |
| 148 | + if ($resultSet->count() == 0) | |
| 149 | 149 | throw new NoDataFoundException(); | 
| 150 | 150 | |
| 151 | 151 | $array = $resultSet->toArray()[0]; | 
| @@ -162,7 +162,7 @@ discard block | ||
| 162 | 162 | */ | 
| 163 | 163 | public function save() | 
| 164 | 164 |      { | 
| 165 | - if(empty($this->getId())) | |
| 165 | + if (empty($this->getId())) | |
| 166 | 166 |          { | 
| 167 | 167 | return $this->insert(); | 
| 168 | 168 | } | 
| @@ -187,12 +187,12 @@ discard block | ||
| 187 | 187 | $table = new TableGateway(self::getInstance()); | 
| 188 | 188 | $resultSet = $table->select($where); | 
| 189 | 189 | |
| 190 | - if($resultSet->count() == 0) | |
| 190 | + if ($resultSet->count() == 0) | |
| 191 | 191 | throw new NoDataFoundException(); | 
| 192 | 192 | |
| 193 | 193 | $list = new ArrayList(); | 
| 194 | 194 | |
| 195 | - foreach($resultSet->toArray() as $array) | |
| 195 | + foreach ($resultSet->toArray() as $array) | |
| 196 | 196 |          { | 
| 197 | 197 | $obj = self::getInstance(); | 
| 198 | 198 | Populator::populate($obj, $array); | 
| @@ -241,7 +241,7 @@ discard block | ||
| 241 | 241 | */ | 
| 242 | 242 | public function delete() | 
| 243 | 243 |      { | 
| 244 | - if(!empty($this->primaryKey)) | |
| 244 | + if (!empty($this->primaryKey)) | |
| 245 | 245 |          { | 
| 246 | 246 | return $this->tableGateway->delete([$this->primaryKey => $this->getId()]); | 
| 247 | 247 | } |