| @@ -80,7 +80,7 @@ discard block | ||
| 80 | 80 | |
| 81 | 81 | $this->extendProperties($this->newProperties); | 
| 82 | 82 | |
| 83 | -    $this->accessors->set('location', P_CONTAINER_GET, function (V2FleetContainer $that) { | |
| 83 | +    $this->accessors->set('location', P_CONTAINER_GET, function(V2FleetContainer $that) { | |
| 84 | 84 |        if (is_null($location = $that->getDirect('location'))) { | 
| 85 | 85 | $location = new V2Location(LOC_FLEET); | 
| 86 | 86 |          $that->setDirect('location', $location); | 
| @@ -89,12 +89,12 @@ discard block | ||
| 89 | 89 | return $location; | 
| 90 | 90 | }); | 
| 91 | 91 | |
| 92 | -    $this->accessors->set('dbId', P_CONTAINER_SET, function (V2FleetContainer $that, $value) { | |
| 92 | +    $this->accessors->set('dbId', P_CONTAINER_SET, function(V2FleetContainer $that, $value) { | |
| 93 | 93 |        $that->setDirect('dbId', $value); | 
| 94 | 94 | $that->location->setLocationId($value); | 
| 95 | 95 | }); | 
| 96 | 96 | |
| 97 | -    $this->accessors->set('ownerId', P_CONTAINER_SET, function (V2FleetContainer $that, $value) { | |
| 97 | +    $this->accessors->set('ownerId', P_CONTAINER_SET, function(V2FleetContainer $that, $value) { | |
| 98 | 98 |        $that->setDirect('ownerId', $value); | 
| 99 | 99 | $that->location->setLocationPlayerId($value); | 
| 100 | 100 | }); | 
| @@ -105,7 +105,7 @@ discard block | ||
| 105 | 105 |      $this->accessors->set('vectorArrive', P_CONTAINER_EXPORT, array($this, 'exportVector')); | 
| 106 | 106 | |
| 107 | 107 | |
| 108 | -    $this->accessors->set('units', P_CONTAINER_GET, function (V2FleetContainer $that) { | |
| 108 | +    $this->accessors->set('units', P_CONTAINER_GET, function(V2FleetContainer $that) { | |
| 109 | 109 |        if (is_null($units = $that->getDirect('units'))) { | 
| 110 | 110 | $units = \classSupernova::$gc->unitList; | 
| 111 | 111 |          $that->setDirect('units', $units); | 
| @@ -114,7 +114,7 @@ discard block | ||
| 114 | 114 | return $units; | 
| 115 | 115 | }); | 
| 116 | 116 | |
| 117 | -    $this->accessors->set('isReturning', P_CONTAINER_GET, function (V2FleetContainer $that) { | |
| 117 | +    $this->accessors->set('isReturning', P_CONTAINER_GET, function(V2FleetContainer $that) { | |
| 118 | 118 | return $that->status == FLEET_FLAG_RETURNING; | 
| 119 | 119 | }); | 
| 120 | 120 | |
| @@ -15,7 +15,7 @@ | ||
| 15 | 15 | } | 
| 16 | 16 | |
| 17 | 17 |    public static function build($callable) { | 
| 18 | -    if(is_array($callable) && count($callable) == 2 && is_object($callable[0])) { | |
| 18 | +    if (is_array($callable) && count($callable) == 2 && is_object($callable[0])) { | |
| 19 | 19 | return new static($callable); | 
| 20 | 20 |      } else { | 
| 21 | 21 | return false; | 
| @@ -40,7 +40,7 @@ discard block | ||
| 40 | 40 | * @return bool | 
| 41 | 41 | */ | 
| 42 | 42 |    public function exists($varName, $accessor) { | 
| 43 | - return isset($this->accessors[$varName . $accessor]); | |
| 43 | + return isset($this->accessors[$varName.$accessor]); | |
| 44 | 44 | } | 
| 45 | 45 | |
| 46 | 46 | /** | 
| @@ -58,7 +58,7 @@ discard block | ||
| 58 | 58 |      if (empty($callable)) { | 
| 59 | 59 | return; | 
| 60 | 60 |      } elseif (!is_callable($callable)) { | 
| 61 | -      throw new \Exception('Error assigning callable in ' . get_called_class() . '::set()! Callable typed [' . $accessor . '] is not a callable or not accessible in the scope'); | |
| 61 | +      throw new \Exception('Error assigning callable in '.get_called_class().'::set()! Callable typed ['.$accessor.'] is not a callable or not accessible in the scope'); | |
| 62 | 62 | } | 
| 63 | 63 | |
| 64 | 64 | // Converting method array-callable to closure | 
| @@ -68,13 +68,13 @@ discard block | ||
| 68 | 68 | // $callable = $method->getClosure($callable[0]); | 
| 69 | 69 | // } | 
| 70 | 70 | |
| 71 | -    if($invoker = Invoker::build($callable)) { | |
| 71 | +    if ($invoker = Invoker::build($callable)) { | |
| 72 | 72 | $callable = $invoker; | 
| 73 | 73 | } | 
| 74 | 74 | |
| 75 | - $this->accessors[$varName . $accessor] = $callable; | |
| 76 | -    if($shared) { | |
| 77 | - $this->shared[$varName . $accessor] = true; | |
| 75 | + $this->accessors[$varName.$accessor] = $callable; | |
| 76 | +    if ($shared) { | |
| 77 | + $this->shared[$varName.$accessor] = true; | |
| 78 | 78 | } | 
| 79 | 79 | } | 
| 80 | 80 | |
| @@ -100,13 +100,13 @@ discard block | ||
| 100 | 100 | */ | 
| 101 | 101 |    public function execute($varName, $accessor, $params) { | 
| 102 | 102 |      if (!$this->exists($varName, $accessor)) { | 
| 103 | -      throw new \Exception("No [{$accessor}] accessor found for variable [{$varName}] on " . get_called_class() . "::" . __METHOD__); | |
| 103 | +      throw new \Exception("No [{$accessor}] accessor found for variable [{$varName}] on ".get_called_class()."::".__METHOD__); | |
| 104 | 104 | } | 
| 105 | 105 | |
| 106 | - $functionName = $varName . $accessor; | |
| 106 | + $functionName = $varName.$accessor; | |
| 107 | 107 | |
| 108 | -    if(isset($this->shared[$functionName])) { | |
| 109 | -      if(!array_key_exists($functionName, $this->executed)) { | |
| 108 | +    if (isset($this->shared[$functionName])) { | |
| 109 | +      if (!array_key_exists($functionName, $this->executed)) { | |
| 110 | 110 | $this->executed[$functionName] = call_user_func_array($this->accessors[$functionName], $params); | 
| 111 | 111 | } | 
| 112 | 112 | return $this->executed[$functionName]; |