@@ -154,7 +154,7 @@ |
||
154 | 154 | /** |
155 | 155 | * Get formats for date parsing. |
156 | 156 | * |
157 | - * @return array |
|
157 | + * @return string[] |
|
158 | 158 | */ |
159 | 159 | public function getParserFormats() |
160 | 160 | { |
@@ -24,7 +24,6 @@ |
||
24 | 24 | /** |
25 | 25 | * Before action. |
26 | 26 | * |
27 | - * @param string $role |
|
28 | 27 | * |
29 | 28 | * @return void |
30 | 29 | */ |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | */ |
79 | 79 | public function isAdmin($user_id) |
80 | 80 | { |
81 | - return $this->userSession->isAdmin() || // Avoid SQL query if connected |
|
81 | + return $this->userSession->isAdmin() || // Avoid SQL query if connected |
|
82 | 82 | $this->db |
83 | 83 | ->table(self::TABLE) |
84 | 84 | ->eq('id', $user_id) |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | { |
317 | 317 | $this->avatarModel->remove($user_id); |
318 | 318 | |
319 | - return $this->db->transaction(function (Database $db) use ($user_id) { |
|
319 | + return $this->db->transaction(function(Database $db) use ($user_id) { |
|
320 | 320 | |
321 | 321 | // All assigned tasks are now unassigned (no foreign key) |
322 | 322 | if (!$db->table(TaskModel::TABLE)->eq('owner_id', $user_id)->update(['owner_id' => 0])) { |
@@ -186,7 +186,7 @@ |
||
186 | 186 | { |
187 | 187 | $interface = '\Jitamin\Foundation\Security\\'.$interface; |
188 | 188 | |
189 | - return array_filter($this->providers, function (AuthenticationProviderInterface $provider) use ($interface) { |
|
189 | + return array_filter($this->providers, function(AuthenticationProviderInterface $provider) use ($interface) { |
|
190 | 190 | return is_a($provider, $interface); |
191 | 191 | }); |
192 | 192 | } |
@@ -27,7 +27,7 @@ |
||
27 | 27 | */ |
28 | 28 | public function register(Container $container) |
29 | 29 | { |
30 | - $container['emailClient'] = function ($container) { |
|
30 | + $container['emailClient'] = function($container) { |
|
31 | 31 | $mailer = new EmailClient($container); |
32 | 32 | $mailer->setTransport('smtp', '\Jitamin\Foundation\Mail\Transport\Smtp'); |
33 | 33 | $mailer->setTransport('sendmail', '\Jitamin\Foundation\Mail\Transport\Sendmail'); |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | */ |
78 | 78 | public function createUserFilter(Container $container) |
79 | 79 | { |
80 | - $container['userQuery'] = $container->factory(function ($c) { |
|
80 | + $container['userQuery'] = $container->factory(function($c) { |
|
81 | 81 | $builder = new QueryBuilder(); |
82 | 82 | $builder->withQuery($c['db']->table(UserModel::TABLE)); |
83 | 83 | |
@@ -96,28 +96,28 @@ discard block |
||
96 | 96 | */ |
97 | 97 | public function createProjectFilter(Container $container) |
98 | 98 | { |
99 | - $container['projectGroupRoleQuery'] = $container->factory(function ($c) { |
|
99 | + $container['projectGroupRoleQuery'] = $container->factory(function($c) { |
|
100 | 100 | $builder = new QueryBuilder(); |
101 | 101 | $builder->withQuery($c['db']->table(ProjectGroupRoleModel::TABLE)); |
102 | 102 | |
103 | 103 | return $builder; |
104 | 104 | }); |
105 | 105 | |
106 | - $container['projectUserRoleQuery'] = $container->factory(function ($c) { |
|
106 | + $container['projectUserRoleQuery'] = $container->factory(function($c) { |
|
107 | 107 | $builder = new QueryBuilder(); |
108 | 108 | $builder->withQuery($c['db']->table(ProjectUserRoleModel::TABLE)); |
109 | 109 | |
110 | 110 | return $builder; |
111 | 111 | }); |
112 | 112 | |
113 | - $container['projectQuery'] = $container->factory(function ($c) { |
|
113 | + $container['projectQuery'] = $container->factory(function($c) { |
|
114 | 114 | $builder = new QueryBuilder(); |
115 | 115 | $builder->withQuery($c['db']->table(ProjectModel::TABLE)); |
116 | 116 | |
117 | 117 | return $builder; |
118 | 118 | }); |
119 | 119 | |
120 | - $container['projectActivityLexer'] = $container->factory(function ($c) { |
|
120 | + $container['projectActivityLexer'] = $container->factory(function($c) { |
|
121 | 121 | $builder = new LexerBuilder(); |
122 | 122 | $builder |
123 | 123 | ->withQuery($c['projectActivityModel']->getQuery()) |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | return $builder; |
135 | 135 | }); |
136 | 136 | |
137 | - $container['projectActivityQuery'] = $container->factory(function ($c) { |
|
137 | + $container['projectActivityQuery'] = $container->factory(function($c) { |
|
138 | 138 | $builder = new QueryBuilder(); |
139 | 139 | $builder->withQuery($c['projectActivityModel']->getQuery()); |
140 | 140 | |
@@ -153,14 +153,14 @@ discard block |
||
153 | 153 | */ |
154 | 154 | public function createTaskFilter(Container $container) |
155 | 155 | { |
156 | - $container['taskQuery'] = $container->factory(function ($c) { |
|
156 | + $container['taskQuery'] = $container->factory(function($c) { |
|
157 | 157 | $builder = new QueryBuilder(); |
158 | 158 | $builder->withQuery($c['taskFinderModel']->getExtendedQuery()); |
159 | 159 | |
160 | 160 | return $builder; |
161 | 161 | }); |
162 | 162 | |
163 | - $container['taskLexer'] = $container->factory(function ($c) { |
|
163 | + $container['taskLexer'] = $container->factory(function($c) { |
|
164 | 164 | $builder = new LexerBuilder(); |
165 | 165 | |
166 | 166 | $builder |
@@ -86,7 +86,7 @@ |
||
86 | 86 | /** |
87 | 87 | * Get user object. |
88 | 88 | * |
89 | - * @return Jitamin\Services\Identity\DatabaseUserProvider |
|
89 | + * @return null|DatabaseUserProvider |
|
90 | 90 | */ |
91 | 91 | public function getUser() |
92 | 92 | { |