Passed
Pull Request — master (#260)
by Kai
02:59
created
lib/Db/NotificationMapper.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 	 */
41 41
 	public function find($id) {
42 42
 		$sql = 'SELECT * FROM ' . $this->getTableName() . ' WHERE id = ?';
43
-		return $this->findEntity($sql, [$id]);
43
+		return $this->findEntity($sql, [ $id ]);
44 44
 	}
45 45
 
46 46
 	/**
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	 */
54 54
 	public function findBetween($userId, $from, $until, $limit = null, $offset = null) {
55 55
 		$sql = 'SELECT * FROM ' . $this->getTableName() . ' WHERE userId = ? AND timestamp BETWEEN ? AND ?';
56
-		return $this->findEntities($sql, [$userId, $from, $until], $limit, $offset);
56
+		return $this->findEntities($sql, [ $userId, $from, $until ], $limit, $offset);
57 57
 	}
58 58
 
59 59
 	/**
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	 */
64 64
 	public function findAll($limit = null, $offset = null) {
65 65
 		$sql = 'SELECT * FROM ' . $this->getTableName();
66
-		return $this->findEntities($sql, [], $limit, $offset);
66
+		return $this->findEntities($sql, [ ], $limit, $offset);
67 67
 	}
68 68
 
69 69
 	/**
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 	 */
75 75
 	public function findAllByPoll($pollId, $limit = null, $offset = null) {
76 76
 		$sql = 'SELECT * FROM ' . $this->getTableName() . ' WHERE poll_id = ?';
77
-		return $this->findEntities($sql, [$pollId], $limit, $offset);
77
+		return $this->findEntities($sql, [ $pollId ], $limit, $offset);
78 78
 	}
79 79
 
80 80
 	/**
@@ -84,6 +84,6 @@  discard block
 block discarded – undo
84 84
 	 */
85 85
 	public function findByUserAndPoll($pollId, $userId) {
86 86
 		$sql = 'SELECT * FROM ' . $this->getTableName() . ' WHERE poll_id = ? AND user_id = ?';
87
-		return $this->findEntity($sql, [$pollId, $userId]);
87
+		return $this->findEntity($sql, [ $pollId, $userId ]);
88 88
 	}
89 89
 }
Please login to merge, or discard this patch.
lib/Db/TextMapper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	 */
45 45
 	public function findByPoll($pollId, $limit = null, $offset = null) {
46 46
 		$sql = 'SELECT * FROM ' . $this->getTableName() . ' WHERE poll_id = ?';
47
-		return $this->findEntities($sql, [$pollId], $limit, $offset);
47
+		return $this->findEntities($sql, [ $pollId ], $limit, $offset);
48 48
 	}
49 49
 
50 50
 	/**
@@ -52,6 +52,6 @@  discard block
 block discarded – undo
52 52
 	 */
53 53
 	public function deleteByPoll($pollId) {
54 54
 		$sql = 'DELETE FROM ' . $this->getTableName() . ' WHERE poll_id = ?';
55
-		$this->execute($sql, [$pollId]);
55
+		$this->execute($sql, [ $pollId ]);
56 56
 	}
57 57
 }
Please login to merge, or discard this patch.
lib/Db/EventMapper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	 */
45 45
 	public function find($id) {
46 46
 		$sql = 'SELECT * FROM ' . $this->getTableName() . ' WHERE id = ?';
47
-		return $this->findEntity($sql, [$id]);
47
+		return $this->findEntity($sql, [ $id ]);
48 48
 	}
49 49
 
50 50
 	/**
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	 */
56 56
 	public function findByHash($hash, $limit = null, $offset = null) {
57 57
 		$sql = 'SELECT * FROM ' . $this->getTableName() . ' WHERE hash = ?';
58
-		return $this->findEntity($sql, [$hash], $limit, $offset);
58
+		return $this->findEntity($sql, [ $hash ], $limit, $offset);
59 59
 	}
60 60
 
61 61
 	/**
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 	 */
67 67
 	public function findAllForUser($userId, $limit = null, $offset = null) {
68 68
 		$sql = 'SELECT * FROM ' . $this->getTableName() . ' WHERE owner = ?';
69
-		return $this->findEntities($sql, [$userId], $limit, $offset);
69
+		return $this->findEntities($sql, [ $userId ], $limit, $offset);
70 70
 	}
71 71
 
72 72
 	/**
@@ -101,6 +101,6 @@  discard block
 block discarded – undo
101 101
 					OR
102 102
 					*PREFIX*polls_comments.user_id = ?
103 103
 					ORDER BY created';
104
-		return $this->findEntities($sql, ['hidden', $userId, 'hidden', $userId, $userId], $limit, $offset);
104
+		return $this->findEntities($sql, [ 'hidden', $userId, 'hidden', $userId, $userId ], $limit, $offset);
105 105
 	}
106 106
 }
Please login to merge, or discard this patch.
lib/Db/CommentMapper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	 */
45 45
 	public function findDistinctByUser($userId, $limit = null, $offset = null) {
46 46
 		$sql = 'SELECT DISTINCT * FROM ' . $this->getTableName() . ' WHERE user_id = ?';
47
-		return $this->findEntities($sql, [$userId], $limit, $offset);
47
+		return $this->findEntities($sql, [ $userId ], $limit, $offset);
48 48
 	}
49 49
 
50 50
 	/**
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	 */
56 56
 	public function findByPoll($pollId, $limit = null, $offset = null) {
57 57
 		$sql = 'SELECT * FROM ' . $this->getTableName() . ' WHERE poll_id = ? ORDER BY Dt DESC';
58
-		return $this->findEntities($sql, [$pollId], $limit, $offset);
58
+		return $this->findEntities($sql, [ $pollId ], $limit, $offset);
59 59
 	}
60 60
 
61 61
 	/**
@@ -63,6 +63,6 @@  discard block
 block discarded – undo
63 63
 	 */
64 64
 	public function deleteByPoll($pollId) {
65 65
 		$sql = 'DELETE FROM ' . $this->getTableName() . ' WHERE poll_id = ?';
66
-		$this->execute($sql, [$pollId]);
66
+		$this->execute($sql, [ $pollId ]);
67 67
 	}
68 68
 }
Please login to merge, or discard this patch.
lib/Db/DateMapper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	 */
45 45
 	public function findByPoll($pollId, $limit = null, $offset = null) {
46 46
 		$sql = 'SELECT * FROM ' . $this->getTableName() . ' WHERE poll_id = ?';
47
-		return $this->findEntities($sql, [$pollId], $limit, $offset);
47
+		return $this->findEntities($sql, [ $pollId ], $limit, $offset);
48 48
 	}
49 49
 
50 50
 	/**
@@ -52,6 +52,6 @@  discard block
 block discarded – undo
52 52
 	 */
53 53
 	public function deleteByPoll($pollId) {
54 54
 		$sql = 'DELETE FROM ' . $this->getTableName() . ' WHERE poll_id = ?';
55
-		$this->execute($sql, [$pollId]);
55
+		$this->execute($sql, [ $pollId ]);
56 56
 	}
57 57
 }
Please login to merge, or discard this patch.
lib/Db/Model.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,6 +34,6 @@
 block discarded – undo
34 34
 	 * @param $value
35 35
 	 */
36 36
 	public function __set($name, $value) {
37
-		$this->setter($name, [$value]);
37
+		$this->setter($name, [ $value ]);
38 38
 	}
39 39
 }
Please login to merge, or discard this patch.
tests/Unit/Factories/CommentFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
  */
29 29
 $fm->define('OCA\Polls\Db\Comment')->setDefinitions([
30 30
 	'userId' => Faker::firstNameMale(),
31
-	'dt' => function () {
31
+	'dt' => function() {
32 32
 		$date = new DateTime('today');
33 33
 		return $date->format('Y-m-d H:i:s');
34 34
 	},
Please login to merge, or discard this patch.
tests/Unit/Factories/ParticipationFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
  */
29 29
 $fm->define('OCA\Polls\Db\Participation')->setDefinitions([
30 30
 	'userId' => Faker::firstNameMale(),
31
-	'dt' => function () {
31
+	'dt' => function() {
32 32
 		$date = new DateTime('today');
33 33
 		return $date->format('Y-m-d H:i:s');
34 34
 	},
Please login to merge, or discard this patch.
tests/Unit/Factories/DateFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
  * General factory for the date model.
26 26
  */
27 27
 $fm->define('OCA\Polls\Db\Date')->setDefinitions([
28
-	'dt' => function () {
28
+	'dt' => function() {
29 29
 		$date = new DateTime('today');
30 30
 		return $date->format('Y-m-d H:i:s');
31 31
 	}
Please login to merge, or discard this patch.