@@ -19,7 +19,7 @@ |
||
| 19 | 19 | |
| 20 | 20 | $container->setShared( |
| 21 | 21 | 'acl', |
| 22 | - function () use ($db) { |
|
| 22 | + function() use ($db) { |
|
| 23 | 23 | $acl = new AclManager( |
| 24 | 24 | [ |
| 25 | 25 | 'db' => $db, |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | |
| 19 | 19 | $container->setShared( |
| 20 | 20 | 'socialLogin', |
| 21 | - function () use ($config) { |
|
| 21 | + function() use ($config) { |
|
| 22 | 22 | |
| 23 | 23 | /** |
| 24 | 24 | * @todo Change the way provider information is handled |
@@ -21,14 +21,14 @@ |
||
| 21 | 21 | { |
| 22 | 22 | $container->setShared( |
| 23 | 23 | 'db', |
| 24 | - function () { |
|
| 24 | + function() { |
|
| 25 | 25 | $options = [ |
| 26 | 26 | 'host' => envValue('DATA_API_MYSQL_HOST', 'localhost'), |
| 27 | 27 | 'username' => envValue('DATA_API_MYSQL_USER', 'nanobox'), |
| 28 | 28 | 'password' => envValue('DATA_API_MYSQL_PASS', ''), |
| 29 | 29 | 'dbname' => envValue('DATA_API_MYSQL_NAME', 'gonano'), |
| 30 | 30 | 'charset' => 'utf8', |
| 31 | - "options" => [ PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING ] |
|
| 31 | + "options" => [PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING] |
|
| 32 | 32 | ]; |
| 33 | 33 | |
| 34 | 34 | try { |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | //configure the dto config |
| 20 | 20 | $container->setShared( |
| 21 | 21 | 'dtoConfig', |
| 22 | - function () { |
|
| 22 | + function() { |
|
| 23 | 23 | $config = new AutoMapperConfig(); |
| 24 | 24 | $config->getOptions()->dontSkipConstructor(); |
| 25 | 25 | |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | //configure the dto mapper |
| 31 | 31 | $container->set( |
| 32 | 32 | 'mapper', |
| 33 | - function () use ($container) { |
|
| 33 | + function() use ($container) { |
|
| 34 | 34 | return new AutoMapper($container->get('dtoConfig')); |
| 35 | 35 | } |
| 36 | 36 | ); |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | { |
| 21 | 21 | $config = $container->getShared('config'); |
| 22 | 22 | |
| 23 | - $container->setShared('throttler', function () use ($container,$config) { |
|
| 23 | + $container->setShared('throttler', function() use ($container, $config) { |
|
| 24 | 24 | return new RedisThrottler($container->getShared('redis'), [ |
| 25 | 25 | 'bucket_size' => $config->throttle->bucketSize, |
| 26 | 26 | 'refill_time' => $config->throttle->refillTime, |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | public function __construct(array $entity, string $content, string $systemModule, array $user) |
| 23 | 23 | { |
| 24 | 24 | $this->entity = $entity; |
| 25 | - $this->content = $content; |
|
| 25 | + $this->content = $content; |
|
| 26 | 26 | $this->systemModule = $systemModule; |
| 27 | 27 | $this->user = $user; |
| 28 | 28 | } |
@@ -45,12 +45,12 @@ discard block |
||
| 45 | 45 | public static function apps(string $content, string $systemModule, UsersModel $user = null): void |
| 46 | 46 | { |
| 47 | 47 | if (!isset($user)) { |
| 48 | - $user = Di::getDefault()->getUserData(); |
|
| 48 | + $user = Di::getDefault()->getUserData(); |
|
| 49 | 49 | } |
| 50 | 50 | /** |
| 51 | 51 | * Create an array of Apps Push Notification |
| 52 | 52 | */ |
| 53 | - $notificationArray = array( |
|
| 53 | + $notificationArray = array( |
|
| 54 | 54 | 'entity'=> $user->toArray(), |
| 55 | 55 | 'users_id' => Di::getDefault()->getUserData()->getId(), |
| 56 | 56 | 'content'=> $content, |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | /** |
| 62 | 62 | * Convert notification to Rabbitmq message |
| 63 | 63 | */ |
| 64 | - $msg = new AMQPMessage(json_encode($notificationArray, JSON_UNESCAPED_SLASHES), ['delivery_mode' => 2]); |
|
| 64 | + $msg = new AMQPMessage(json_encode($notificationArray, JSON_UNESCAPED_SLASHES), ['delivery_mode' => 2]); |
|
| 65 | 65 | |
| 66 | 66 | $channel = Di::getDefault()->getQueue()->channel(); |
| 67 | 67 | |
@@ -78,13 +78,13 @@ discard block |
||
| 78 | 78 | public static function users(string $content, string $systemModule, UsersModel $user = null): void |
| 79 | 79 | { |
| 80 | 80 | if (!isset($user)) { |
| 81 | - $user = Di::getDefault()->getUserData(); |
|
| 81 | + $user = Di::getDefault()->getUserData(); |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | /** |
| 85 | 85 | * Create an array of Apps Push Notification |
| 86 | 86 | */ |
| 87 | - $notificationArray = array( |
|
| 87 | + $notificationArray = array( |
|
| 88 | 88 | 'entity'=> $user->toArray(), |
| 89 | 89 | 'users_id' => Di::getDefault()->getUserData()->getId(), |
| 90 | 90 | 'content'=> $content, |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | /** |
| 97 | 97 | * Convert notification to Rabbitmq message |
| 98 | 98 | */ |
| 99 | - $msg = new AMQPMessage(json_encode($notificationArray, JSON_UNESCAPED_SLASHES), ['delivery_mode' => 2]); |
|
| 99 | + $msg = new AMQPMessage(json_encode($notificationArray, JSON_UNESCAPED_SLASHES), ['delivery_mode' => 2]); |
|
| 100 | 100 | |
| 101 | 101 | $channel = Di::getDefault()->getQueue()->channel(); |
| 102 | 102 | |
@@ -113,13 +113,13 @@ discard block |
||
| 113 | 113 | public static function system(string $content, string $systemModule, UsersModel $user = null): void |
| 114 | 114 | { |
| 115 | 115 | if (!isset($user)) { |
| 116 | - $user = Di::getDefault()->getUserData(); |
|
| 116 | + $user = Di::getDefault()->getUserData(); |
|
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | /** |
| 120 | 120 | * Create an array of Apps Push Notification |
| 121 | 121 | */ |
| 122 | - $notificationArray = array( |
|
| 122 | + $notificationArray = array( |
|
| 123 | 123 | 'entity'=> $user->toArray(), |
| 124 | 124 | 'users_id' => Di::getDefault()->getUserData()->getId(), |
| 125 | 125 | 'content'=> $content, |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | /** |
| 132 | 132 | * Convert notification to Rabbitmq message |
| 133 | 133 | */ |
| 134 | - $msg = new AMQPMessage(json_encode($notificationArray, JSON_UNESCAPED_SLASHES), ['delivery_mode' => 2]); |
|
| 134 | + $msg = new AMQPMessage(json_encode($notificationArray, JSON_UNESCAPED_SLASHES), ['delivery_mode' => 2]); |
|
| 135 | 135 | |
| 136 | 136 | $channel = Di::getDefault()->getQueue()->channel(); |
| 137 | 137 | |
@@ -146,8 +146,8 @@ |
||
| 146 | 146 | if (array_key_exists('branch', $results)) { |
| 147 | 147 | |
| 148 | 148 | /** |
| 149 | - * Format branches as an array of branches even if there is only one branch per company |
|
| 150 | - */ |
|
| 149 | + * Format branches as an array of branches even if there is only one branch per company |
|
| 150 | + */ |
|
| 151 | 151 | foreach ($results as $key => $value) { |
| 152 | 152 | if (is_object($value['branch'])) { |
| 153 | 153 | $results[$key]['branch'] = array($value['branch']); |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | use function Canvas\Core\envValue; |
| 5 | 5 | |
| 6 | 6 | return [ |
| 7 | - 'application' => [ //@todo migration to app |
|
| 7 | + 'application' => [//@todo migration to app |
|
| 8 | 8 | 'production' => getenv('PRODUCTION'), |
| 9 | 9 | 'development' => getenv('DEVELOPMENT'), |
| 10 | 10 | 'jwtSecurity' => getenv('JWT_SECURITY'), |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | { |
| 19 | 19 | $container->setShared( |
| 20 | 20 | 'config', |
| 21 | - function () { |
|
| 21 | + function() { |
|
| 22 | 22 | $data = !defined('API_TESTS') ? require appPath('library/Core/config.php') : require appPath('src/Core/config.php'); |
| 23 | 23 | |
| 24 | 24 | return new Config($data); |