@@ -14,7 +14,7 @@ |
||
| 14 | 14 | // List users for project |
| 15 | 15 | $url = $this->client->getContainer()->get('router')->generate('members_list', array('id' => $project->getId())); |
| 16 | 16 | $crawler = $this->client->request('GET', $url, array(), array(), array( |
| 17 | - 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
|
| 17 | + 'HTTP_X-Requested-With' => 'XMLHttpRequest', |
|
| 18 | 18 | )); |
| 19 | 19 | $this->assertEquals(200, $this->client->getResponse()->getStatusCode(), 'Unexpected HTTP status code for GET /userprojects/'); |
| 20 | 20 | } |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | $project = $this->getProject($user); |
| 13 | 13 | |
| 14 | 14 | // Get File List |
| 15 | - $projectFileListURL = $this->client->getContainer()->get('router')->generate('project_filelist',array('id'=>$project->getId())); |
|
| 15 | + $projectFileListURL = $this->client->getContainer()->get('router')->generate('project_filelist', array('id'=>$project->getId())); |
|
| 16 | 16 | |
| 17 | 17 | // Create a new entry in the database |
| 18 | 18 | $crawler = $this->client->request('GET', $projectFileListURL); |
@@ -174,19 +174,19 @@ discard block |
||
| 174 | 174 | return $this->findByProjectAndStatus($state, $keyword, $issueMilestoneId, true); |
| 175 | 175 | } |
| 176 | 176 | |
| 177 | - /** |
|
| 178 | - * @param type $project |
|
| 179 | - * |
|
| 180 | - * @return int |
|
| 181 | - */ |
|
| 182 | - public function countIssuesForProjectWithStatus($status = 'open', $keyword = false, $milestone = null) |
|
| 183 | - { |
|
| 184 | - $qb = $this->findByProjectAndStatus($status, $keyword, $milestone, true); |
|
| 185 | - |
|
| 186 | - $qb->select('count(a)'); |
|
| 187 | - |
|
| 188 | - return $qb->getQuery()->getSingleScalarResult(); |
|
| 189 | - } |
|
| 177 | + /** |
|
| 178 | + * @param type $project |
|
| 179 | + * |
|
| 180 | + * @return int |
|
| 181 | + */ |
|
| 182 | + public function countIssuesForProjectWithStatus($status = 'open', $keyword = false, $milestone = null) |
|
| 183 | + { |
|
| 184 | + $qb = $this->findByProjectAndStatus($status, $keyword, $milestone, true); |
|
| 185 | + |
|
| 186 | + $qb->select('count(a)'); |
|
| 187 | + |
|
| 188 | + return $qb->getQuery()->getSingleScalarResult(); |
|
| 189 | + } |
|
| 190 | 190 | |
| 191 | 191 | public function findByProjectAndStatus($status = 'open', $keyword = false, $milestone = null, $queryOnly = false) |
| 192 | 192 | { |
@@ -197,29 +197,29 @@ discard block |
||
| 197 | 197 | $parameters = array('project' => $this->project); |
| 198 | 198 | |
| 199 | 199 | $qb->select('a') |
| 200 | - ->from('VersionControlGitControlBundle:Issue', 'a') |
|
| 201 | - ->where($where) |
|
| 202 | - ->setParameters($parameters); |
|
| 200 | + ->from('VersionControlGitControlBundle:Issue', 'a') |
|
| 201 | + ->where($where) |
|
| 202 | + ->setParameters($parameters); |
|
| 203 | 203 | |
| 204 | 204 | if ($status) { |
| 205 | 205 | $qb->andWhere( |
| 206 | - $qb->expr()->like('a.status', ':status') |
|
| 207 | - )->setParameter('status', $status); |
|
| 206 | + $qb->expr()->like('a.status', ':status') |
|
| 207 | + )->setParameter('status', $status); |
|
| 208 | 208 | } |
| 209 | - //If keyword is set |
|
| 210 | - if ($keyword) { |
|
| 211 | - $qb->andWhere( |
|
| 209 | + //If keyword is set |
|
| 210 | + if ($keyword) { |
|
| 211 | + $qb->andWhere( |
|
| 212 | 212 | $qb->expr()->orX( |
| 213 | 213 | $qb->expr()->like('a.title', ':keyword'), |
| 214 | 214 | $qb->expr()->like('a.description', ':keyword') |
| 215 | 215 | ) |
| 216 | 216 | )->setParameter('keyword', '%'.$keyword.'%'); |
| 217 | - } |
|
| 217 | + } |
|
| 218 | 218 | |
| 219 | 219 | if ($milestone != null) { |
| 220 | 220 | $qb->andWhere( |
| 221 | - $qb->expr()->eq('a.issueMilestone', ':milestone') |
|
| 222 | - )->setParameter('milestone', $milestone); |
|
| 221 | + $qb->expr()->eq('a.issueMilestone', ':milestone') |
|
| 222 | + )->setParameter('milestone', $milestone); |
|
| 223 | 223 | } |
| 224 | 224 | |
| 225 | 225 | $qb->orderBy('a.updatedAt', 'desc'); |
@@ -20,16 +20,16 @@ |
||
| 20 | 20 | $qb = $em->createQueryBuilder(); |
| 21 | 21 | |
| 22 | 22 | $qb->select('a') |
| 23 | - ->from('VersionControlGitControlBundle:UserProjects', 'a') |
|
| 23 | + ->from('VersionControlGitControlBundle:UserProjects', 'a') |
|
| 24 | 24 | ->leftJoin('a.project', 'b') |
| 25 | 25 | ->where('a.user = :user') |
| 26 | 26 | ->setParameter('user', $user); |
| 27 | 27 | |
| 28 | - //If keyword is set |
|
| 29 | - if ($keyword) { |
|
| 30 | - $qb->andWhere(' b.title LIKE :keyword OR b.description LIKE :keyword ') |
|
| 31 | - ->setParameter('keyword', '%'.$keyword.'%'); |
|
| 32 | - } |
|
| 28 | + //If keyword is set |
|
| 29 | + if ($keyword) { |
|
| 30 | + $qb->andWhere(' b.title LIKE :keyword OR b.description LIKE :keyword ') |
|
| 31 | + ->setParameter('keyword', '%'.$keyword.'%'); |
|
| 32 | + } |
|
| 33 | 33 | |
| 34 | 34 | if ($queryOnly === true) { |
| 35 | 35 | return $qb; |
@@ -20,13 +20,13 @@ |
||
| 20 | 20 | $qb = $em->createQueryBuilder(); |
| 21 | 21 | |
| 22 | 22 | $qb->select('a') |
| 23 | - ->from('VersionControlGitControlBundle:Project', 'a'); |
|
| 23 | + ->from('VersionControlGitControlBundle:Project', 'a'); |
|
| 24 | 24 | |
| 25 | - //If keyword is set |
|
| 26 | - if ($keyword) { |
|
| 27 | - $qb->andWhere('a.title LIKE :keyword OR a.title LIKE :keyword') |
|
| 28 | - ->setParameter('keyword', '%'.$keyword.'%'); |
|
| 29 | - } |
|
| 25 | + //If keyword is set |
|
| 26 | + if ($keyword) { |
|
| 27 | + $qb->andWhere('a.title LIKE :keyword OR a.title LIKE :keyword') |
|
| 28 | + ->setParameter('keyword', '%'.$keyword.'%'); |
|
| 29 | + } |
|
| 30 | 30 | |
| 31 | 31 | if ($queryOnly === true) { |
| 32 | 32 | return $qb; |
@@ -190,19 +190,19 @@ discard block |
||
| 190 | 190 | return $issueMilestone; |
| 191 | 191 | } |
| 192 | 192 | |
| 193 | - /** |
|
| 194 | - * @param type $project |
|
| 195 | - * |
|
| 196 | - * @return int |
|
| 197 | - */ |
|
| 198 | - public function countForProjectWithStatus($status = 'open') |
|
| 199 | - { |
|
| 200 | - $qb = $this->findByProjectAndStatus($status, true); |
|
| 193 | + /** |
|
| 194 | + * @param type $project |
|
| 195 | + * |
|
| 196 | + * @return int |
|
| 197 | + */ |
|
| 198 | + public function countForProjectWithStatus($status = 'open') |
|
| 199 | + { |
|
| 200 | + $qb = $this->findByProjectAndStatus($status, true); |
|
| 201 | 201 | |
| 202 | - $qb->select('count(a)'); |
|
| 202 | + $qb->select('count(a)'); |
|
| 203 | 203 | |
| 204 | - return $qb->getQuery()->getSingleScalarResult(); |
|
| 205 | - } |
|
| 204 | + return $qb->getQuery()->getSingleScalarResult(); |
|
| 205 | + } |
|
| 206 | 206 | |
| 207 | 207 | public function findByProjectAndStatus($status = 'open', $queryOnly = false) |
| 208 | 208 | { |
@@ -213,14 +213,14 @@ discard block |
||
| 213 | 213 | $parameters = array('project' => $this->project); |
| 214 | 214 | |
| 215 | 215 | $qb->select('a') |
| 216 | - ->from('VersionControlGitControlBundle:IssueMilestone', 'a') |
|
| 217 | - ->where($where) |
|
| 218 | - ->setParameters($parameters); |
|
| 216 | + ->from('VersionControlGitControlBundle:IssueMilestone', 'a') |
|
| 217 | + ->where($where) |
|
| 218 | + ->setParameters($parameters); |
|
| 219 | 219 | |
| 220 | 220 | if ($status) { |
| 221 | 221 | $qb->andWhere( |
| 222 | 222 | $qb->expr()->like('a.state', ':status') |
| 223 | - )->setParameter('status', $status); |
|
| 223 | + )->setParameter('status', $status); |
|
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | if ($queryOnly === true) { |
@@ -45,13 +45,13 @@ discard block |
||
| 45 | 45 | if (defined('PHP_MAJOR_VERSION') && PHP_MAJOR_VERSION >= 7) { |
| 46 | 46 | $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length("AES-256-ECB")); |
| 47 | 47 | |
| 48 | - return trim(base64_encode(openssl_encrypt ( |
|
| 49 | - $data , |
|
| 48 | + return trim(base64_encode(openssl_encrypt( |
|
| 49 | + $data, |
|
| 50 | 50 | "AES-256-ECB", |
| 51 | 51 | $this->secretKey, |
| 52 | 52 | 0, |
| 53 | 53 | $iv))); |
| 54 | - }else{ |
|
| 54 | + } else { |
|
| 55 | 55 | return trim(base64_encode(mcrypt_encrypt( |
| 56 | 56 | MCRYPT_RIJNDAEL_256, $this->secretKey, $data, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND |
| 57 | 57 | )))); |
@@ -74,13 +74,13 @@ discard block |
||
| 74 | 74 | if (defined('PHP_MAJOR_VERSION') && PHP_MAJOR_VERSION >= 7) { |
| 75 | 75 | $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length("AES-256-ECB")); |
| 76 | 76 | |
| 77 | - return trim(openssl_decrypt ( |
|
| 78 | - base64_decode($data) , |
|
| 77 | + return trim(openssl_decrypt( |
|
| 78 | + base64_decode($data), |
|
| 79 | 79 | "AES-256-ECB", |
| 80 | 80 | $this->secretKey, |
| 81 | 81 | 0, |
| 82 | 82 | $iv)); |
| 83 | - }else{ |
|
| 83 | + } else { |
|
| 84 | 84 | return trim(mcrypt_decrypt( |
| 85 | 85 | MCRYPT_RIJNDAEL_256, $this->secretKey, base64_decode($data), MCRYPT_MODE_ECB, mcrypt_create_iv( |
| 86 | 86 | mcrypt_get_iv_size( |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | $this->secretKey, |
| 52 | 52 | 0, |
| 53 | 53 | $iv))); |
| 54 | - }else{ |
|
| 54 | + } else{ |
|
| 55 | 55 | return trim(base64_encode(mcrypt_encrypt( |
| 56 | 56 | MCRYPT_RIJNDAEL_256, $this->secretKey, $data, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND |
| 57 | 57 | )))); |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | $this->secretKey, |
| 81 | 81 | 0, |
| 82 | 82 | $iv)); |
| 83 | - }else{ |
|
| 83 | + } else{ |
|
| 84 | 84 | return trim(mcrypt_decrypt( |
| 85 | 85 | MCRYPT_RIJNDAEL_256, $this->secretKey, base64_decode($data), MCRYPT_MODE_ECB, mcrypt_create_iv( |
| 86 | 86 | mcrypt_get_iv_size( |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | |
| 81 | 81 | if (!$input->getArgument('username')) { |
| 82 | 82 | $question = new Question('Please choose a username:'); |
| 83 | - $question->setValidator(function ($username) { |
|
| 83 | + $question->setValidator(function($username) { |
|
| 84 | 84 | if (empty($username)) { |
| 85 | 85 | throw new \Exception('Username can not be empty'); |
| 86 | 86 | } |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | |
| 93 | 93 | if (!$input->getArgument('email')) { |
| 94 | 94 | $question = new Question('Please choose an email:'); |
| 95 | - $question->setValidator(function ($email) { |
|
| 95 | + $question->setValidator(function($email) { |
|
| 96 | 96 | if (empty($email)) { |
| 97 | 97 | throw new \Exception('Email can not be empty'); |
| 98 | 98 | } |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | |
| 105 | 105 | if (!$input->getArgument('password')) { |
| 106 | 106 | $question = new Question('Please choose a password:'); |
| 107 | - $question->setValidator(function ($password) { |
|
| 107 | + $question->setValidator(function($password) { |
|
| 108 | 108 | if (empty($password)) { |
| 109 | 109 | throw new \Exception('Password can not be empty'); |
| 110 | 110 | } |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | |
| 118 | 118 | if (!$input->getArgument('name')) { |
| 119 | 119 | $question = new Question('Please choose a display name:'); |
| 120 | - $question->setValidator(function ($name) { |
|
| 120 | + $question->setValidator(function($name) { |
|
| 121 | 121 | if (empty($name)) { |
| 122 | 122 | throw new \Exception('Display name can not be empty'); |
| 123 | 123 | } |
@@ -38,13 +38,13 @@ discard block |
||
| 38 | 38 | if (defined('PHP_MAJOR_VERSION') && PHP_MAJOR_VERSION >= 7) { |
| 39 | 39 | $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length("AES-256-ECB")); |
| 40 | 40 | |
| 41 | - return trim(base64_encode(openssl_encrypt ( |
|
| 42 | - $data , |
|
| 41 | + return trim(base64_encode(openssl_encrypt( |
|
| 42 | + $data, |
|
| 43 | 43 | "AES-256-ECB", |
| 44 | 44 | $this->secretKey, |
| 45 | 45 | 0, |
| 46 | 46 | $iv))); |
| 47 | - }else{ |
|
| 47 | + } else { |
|
| 48 | 48 | return trim(base64_encode(mcrypt_encrypt( |
| 49 | 49 | MCRYPT_RIJNDAEL_256, $this->secretKey, $data, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND |
| 50 | 50 | )))); |
@@ -63,13 +63,13 @@ discard block |
||
| 63 | 63 | if (defined('PHP_MAJOR_VERSION') && PHP_MAJOR_VERSION >= 7) { |
| 64 | 64 | $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length("AES-256-ECB")); |
| 65 | 65 | |
| 66 | - return trim(openssl_decrypt ( |
|
| 67 | - base64_decode($data) , |
|
| 66 | + return trim(openssl_decrypt( |
|
| 67 | + base64_decode($data), |
|
| 68 | 68 | "AES-256-ECB", |
| 69 | 69 | $this->secretKey, |
| 70 | 70 | 0, |
| 71 | 71 | $iv)); |
| 72 | - }else{ |
|
| 72 | + } else { |
|
| 73 | 73 | return trim(mcrypt_decrypt( |
| 74 | 74 | MCRYPT_RIJNDAEL_256, $this->secretKey, base64_decode($data), MCRYPT_MODE_ECB, mcrypt_create_iv( |
| 75 | 75 | mcrypt_get_iv_size( |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | $this->secretKey, |
| 45 | 45 | 0, |
| 46 | 46 | $iv))); |
| 47 | - }else{ |
|
| 47 | + } else{ |
|
| 48 | 48 | return trim(base64_encode(mcrypt_encrypt( |
| 49 | 49 | MCRYPT_RIJNDAEL_256, $this->secretKey, $data, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND |
| 50 | 50 | )))); |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | $this->secretKey, |
| 70 | 70 | 0, |
| 71 | 71 | $iv)); |
| 72 | - }else{ |
|
| 72 | + } else{ |
|
| 73 | 73 | return trim(mcrypt_decrypt( |
| 74 | 74 | MCRYPT_RIJNDAEL_256, $this->secretKey, base64_decode($data), MCRYPT_MODE_ECB, mcrypt_create_iv( |
| 75 | 75 | mcrypt_get_iv_size( |