@@ -50,7 +50,9 @@ |
||
| 50 | 50 | $file = array_pop($parts); |
| 51 | 51 | $dir = ''; |
| 52 | 52 | foreach ($parts as $part) { |
| 53 | - if (!is_dir($dir .= "$part/")) mkdir($dir); |
|
| 53 | + if (!is_dir($dir .= "$part/")) { |
|
| 54 | + mkdir($dir); |
|
| 55 | + } |
|
| 54 | 56 | } |
| 55 | 57 | if( is_file($destination) ){ |
| 56 | 58 | rename($destination, $destination . '.bak'); |
@@ -5,9 +5,9 @@ discard block |
||
| 5 | 5 | trait PropertiesBag |
| 6 | 6 | { |
| 7 | 7 | private $attributes = []; |
| 8 | - private $data = []; |
|
| 8 | + private $data = []; |
|
| 9 | 9 | |
| 10 | - protected function setPropertiesBag($attributes) |
|
| 10 | + protected function setPropertiesBag($attributes) |
|
| 11 | 11 | { |
| 12 | 12 | $this->attributes = $attributes; |
| 13 | 13 | } |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | return array_key_exists($name, $this->data); |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | - public function __set($name, $value) |
|
| 44 | + public function __set($name, $value) |
|
| 45 | 45 | { |
| 46 | 46 | $trace = debug_backtrace(); |
| 47 | 47 | if( ! $this->isPropertyAllowed($name) ) { |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | $this->data[$name] = $value; |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | - public function __get($name) |
|
| 59 | + public function __get($name) |
|
| 60 | 60 | { |
| 61 | 61 | $trace = debug_backtrace(); |
| 62 | 62 | if( ! $this->isPropertyAllowed($name) ) { |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | return $this->data[$name]; |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | - public function __isset($name) |
|
| 83 | + public function __isset($name) |
|
| 84 | 84 | { |
| 85 | 85 | $trace = debug_backtrace(); |
| 86 | 86 | if( ! $this->isPropertyAllowed($name) ) { |
@@ -251,10 +251,11 @@ discard block |
||
| 251 | 251 | 'available' => $available |
| 252 | 252 | ]; |
| 253 | 253 | |
| 254 | - foreach($from as $xKey => $xs) |
|
| 255 | - foreach($xs as $yKey => $pair) |
|
| 254 | + foreach($from as $xKey => $xs) { |
|
| 255 | + foreach($xs as $yKey => $pair) |
|
| 256 | 256 | if( $yKey === $entityY->getId() ) { |
| 257 | 257 | $r[$who][$xKey] = $pair[0]; |
| 258 | + } |
|
| 258 | 259 | unset($r['available'][$xKey]); |
| 259 | 260 | } |
| 260 | 261 | |
@@ -268,10 +269,11 @@ discard block |
||
| 268 | 269 | 'available' => $available |
| 269 | 270 | ]; |
| 270 | 271 | |
| 271 | - foreach($from as $xKey => $xs) |
|
| 272 | - foreach($xs as $yKey => $pair) |
|
| 272 | + foreach($from as $xKey => $xs) { |
|
| 273 | + foreach($xs as $yKey => $pair) |
|
| 273 | 274 | if ($xKey === $entityX->getId()) { |
| 274 | 275 | $r[$who][$yKey] = $pair[1]; |
| 276 | + } |
|
| 275 | 277 | unset($r['available'][$yKey]); |
| 276 | 278 | } |
| 277 | 279 | |
@@ -20,8 +20,8 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | use GroupUseCases; |
| 22 | 22 | |
| 23 | - public function __construct($id, $name, $desc) |
|
| 24 | - { |
|
| 23 | + public function __construct($id, $name, $desc) |
|
| 24 | + { |
|
| 25 | 25 | $this->setPropertiesBag(['id', 'name', 'desc']); |
| 26 | 26 | $this->setSettersBag($this->getPropertiesBag()); |
| 27 | 27 | |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | $this->setDesc($desc); |
| 31 | 31 | |
| 32 | 32 | // TODO: Raise CreateGroupDomainEvent($this) |
| 33 | - } |
|
| 33 | + } |
|
| 34 | 34 | |
| 35 | 35 | public function __toString() |
| 36 | 36 | { |
@@ -20,8 +20,8 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | use RoleUseCases; |
| 22 | 22 | |
| 23 | - public function __construct($id, $name, $desc) |
|
| 24 | - { |
|
| 23 | + public function __construct($id, $name, $desc) |
|
| 24 | + { |
|
| 25 | 25 | $this->setPropertiesBag(['id', 'name', 'desc']); |
| 26 | 26 | $this->setSettersBag($this->getPropertiesBag()); |
| 27 | 27 | |
@@ -29,8 +29,8 @@ discard block |
||
| 29 | 29 | $this->setName($name); |
| 30 | 30 | $this->setDesc($desc); |
| 31 | 31 | |
| 32 | - // TODO: Raise CreateRoleDomainEvent($this) |
|
| 33 | - } |
|
| 32 | + // TODO: Raise CreateRoleDomainEvent($this) |
|
| 33 | + } |
|
| 34 | 34 | |
| 35 | 35 | public function __toString() |
| 36 | 36 | { |
@@ -20,8 +20,8 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | use ModuleUseCases; |
| 22 | 22 | |
| 23 | - public function __construct($id, $name, $desc) |
|
| 24 | - { |
|
| 23 | + public function __construct($id, $name, $desc) |
|
| 24 | + { |
|
| 25 | 25 | $this->setPropertiesBag(['id', 'name', 'desc']); |
| 26 | 26 | $this->setSettersBag($this->getPropertiesBag()); |
| 27 | 27 | |
@@ -29,8 +29,8 @@ discard block |
||
| 29 | 29 | $this->setName($name); |
| 30 | 30 | $this->setDesc($desc); |
| 31 | 31 | |
| 32 | - // TODO: Raise CreateModuleDomainEvent($this) |
|
| 33 | - } |
|
| 32 | + // TODO: Raise CreateModuleDomainEvent($this) |
|
| 33 | + } |
|
| 34 | 34 | |
| 35 | 35 | public function __toString() |
| 36 | 36 | { |