Completed
Push — dartcafe-patch-1 ( 8dca15...e6a7a2 )
by René
04:27 queued 02:14
created
lib/AppInfo/Application.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         /**
50 50
          * Controllers
51 51
          */
52
-        $container->registerService('PageController', function ($c) use ($server) {
52
+        $container->registerService('PageController', function($c) use ($server) {
53 53
             /** @var SimpleContainer $c */
54 54
             return new PageController(
55 55
                 $c->query('AppName'),
@@ -71,73 +71,73 @@  discard block
 block discarded – undo
71 71
             );
72 72
         });
73 73
 
74
-        $container->registerService('UserManager', function ($c) {
74
+        $container->registerService('UserManager', function($c) {
75 75
             /** @var SimpleContainer $c */
76 76
             return $c->query('ServerContainer')->getUserManager();
77 77
         });
78 78
 
79
-        $container->registerService('GroupManager', function ($c) {
79
+        $container->registerService('GroupManager', function($c) {
80 80
             /** @var SimpleContainer $c */
81 81
             return $c->query('ServerContainer')->getGroupManager();
82 82
         });
83 83
 
84
-        $container->registerService('AvatarManager', function ($c) {
84
+        $container->registerService('AvatarManager', function($c) {
85 85
             /** @var SimpleContainer $c */
86 86
             return $c->query('ServerContainer')->getAvatarManager();
87 87
         });
88 88
 
89
-        $container->registerService('Logger', function ($c) {
89
+        $container->registerService('Logger', function($c) {
90 90
             /** @var SimpleContainer $c */
91 91
             return $c->query('ServerContainer')->getLogger();
92 92
         });
93 93
 
94
-        $container->registerService('L10N', function ($c) {
94
+        $container->registerService('L10N', function($c) {
95 95
             return $c->query('ServerContainer')->getL10N($c->query('AppName'));
96 96
         });
97 97
 
98
-        $container->registerService('CommentMapper', function ($c) use ($server) {
98
+        $container->registerService('CommentMapper', function($c) use ($server) {
99 99
             /** @var SimpleContainer $c */
100 100
             return new CommentMapper(
101 101
                 $server->getDatabaseConnection()
102 102
             );
103 103
         });
104 104
 
105
-        $container->registerService('DateMapper', function ($c) use ($server) {
105
+        $container->registerService('DateMapper', function($c) use ($server) {
106 106
             /** @var SimpleContainer $c */
107 107
             return new DateMapper(
108 108
                 $server->getDatabaseConnection()
109 109
             );
110 110
         });
111 111
 
112
-        $container->registerService('EventMapper', function ($c) use ($server) {
112
+        $container->registerService('EventMapper', function($c) use ($server) {
113 113
             /** @var SimpleContainer $c */
114 114
             return new EventMapper(
115 115
                 $server->getDatabaseConnection()
116 116
             );
117 117
         });
118 118
 
119
-        $container->registerService('NotificationMapper', function ($c) use ($server) {
119
+        $container->registerService('NotificationMapper', function($c) use ($server) {
120 120
             /** @var SimpleContainer $c */
121 121
             return new NotificationMapper(
122 122
                 $server->getDatabaseConnection()
123 123
             );
124 124
         });
125 125
 
126
-        $container->registerService('ParticipationMapper', function ($c) use ($server) {
126
+        $container->registerService('ParticipationMapper', function($c) use ($server) {
127 127
             /** @var SimpleContainer $c */
128 128
             return new ParticipationMapper(
129 129
                 $server->getDatabaseConnection()
130 130
             );
131 131
         });
132 132
 
133
-        $container->registerService('ParticipationTextMapper', function ($c) use ($server) {
133
+        $container->registerService('ParticipationTextMapper', function($c) use ($server) {
134 134
             /** @var SimpleContainer $c */
135 135
             return new ParticipationTextMapper(
136 136
                 $server->getDatabaseConnection()
137 137
             );
138 138
         });
139 139
 
140
-        $container->registerService('TextMapper', function ($c) use ($server) {
140
+        $container->registerService('TextMapper', function($c) use ($server) {
141 141
             /** @var SimpleContainer $c */
142 142
             return new TextMapper(
143 143
                 $server->getDatabaseConnection()
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
      */
151 151
     public function registerNavigationEntry() {
152 152
         $container = $this->getContainer();
153
-        $container->query('OCP\INavigationManager')->add(function () use ($container) {
153
+        $container->query('OCP\INavigationManager')->add(function() use ($container) {
154 154
             $urlGenerator = $container->query('OCP\IURLGenerator');
155 155
             $l10n = $container->query('OCP\IL10N');
156 156
             return [
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/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/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/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/ParticipationMapper.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 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 = ?';
58
-        return $this->findEntities($sql, [$pollId], $limit, $offset);
58
+        return $this->findEntities($sql, [ $pollId ], $limit, $offset);
59 59
     }
60 60
 
61 61
     /**
@@ -63,7 +63,7 @@  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
 
69 69
     /**
@@ -72,6 +72,6 @@  discard block
 block discarded – undo
72 72
      */
73 73
     public function deleteByPollAndUser($pollId, $userId) {
74 74
         $sql = 'DELETE FROM ' . $this->getTableName() . ' WHERE poll_id = ? AND user_id = ?';
75
-        $this->execute($sql, [$pollId, $userId]);
75
+        $this->execute($sql, [ $pollId, $userId ]);
76 76
     }
77 77
 }
Please login to merge, or discard this patch.
lib/Db/ParticipationTextMapper.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -47,16 +47,16 @@
 block discarded – undo
47 47
         return $this->findEntities($sql, [$pollId], $limit, $offset);
48 48
     }
49 49
 
50
-	/**
51
-	 * @param string $userId
52
-	 * @param int $limit
53
-	 * @param int $offset
54
-	 * @return ParticipationText[]
55
-	 */
56
-	public function findDistinctByUser($userId, $limit = null, $offset = null) {
57
-		$sql = 'SELECT DISTINCT * FROM ' . $this->getTableName() . ' WHERE user_id = ?';
58
-		return $this->findEntities($sql, [$userId], $limit, $offset);
59
-	}
50
+    /**
51
+     * @param string $userId
52
+     * @param int $limit
53
+     * @param int $offset
54
+     * @return ParticipationText[]
55
+     */
56
+    public function findDistinctByUser($userId, $limit = null, $offset = null) {
57
+        $sql = 'SELECT DISTINCT * FROM ' . $this->getTableName() . ' WHERE user_id = ?';
58
+        return $this->findEntities($sql, [$userId], $limit, $offset);
59
+    }
60 60
 
61 61
     /**
62 62
      * @param string $pollId
Please login to merge, or discard this 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 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
 	/**
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	 */
56 56
 	public function findDistinctByUser($userId, $limit = null, $offset = null) {
57 57
 		$sql = 'SELECT DISTINCT * FROM ' . $this->getTableName() . ' WHERE user_id = ?';
58
-		return $this->findEntities($sql, [$userId], $limit, $offset);
58
+		return $this->findEntities($sql, [ $userId ], $limit, $offset);
59 59
 	}
60 60
 
61 61
     /**
@@ -63,7 +63,7 @@  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
 
69 69
     /**
@@ -72,6 +72,6 @@  discard block
 block discarded – undo
72 72
      */
73 73
     public function deleteByPollAndUser($pollId, $userId) {
74 74
         $sql = 'DELETE FROM ' . $this->getTableName() . ' WHERE poll_id = ? AND user_id = ?';
75
-        $this->execute($sql, [$pollId, $userId]);
75
+        $this->execute($sql, [ $pollId, $userId ]);
76 76
     }
77 77
 }
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.
tests/Integration/AppTest.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -28,16 +28,16 @@
 block discarded – undo
28 28
 
29 29
 class AppTest extends TestCase {
30 30
 
31
-	private $container;
31
+    private $container;
32 32
 
33
-	public function setUp() {
34
-		parent::setUp();
35
-		$app = new App('polls');
36
-		$this->container = $app->getContainer();
37
-	}
33
+    public function setUp() {
34
+        parent::setUp();
35
+        $app = new App('polls');
36
+        $this->container = $app->getContainer();
37
+    }
38 38
 
39
-	public function testAppInstalled() {
40
-		$appManager = $this->container->query('OCP\App\IAppManager');
41
-		$this->assertTrue($appManager->isInstalled('polls'));
42
-	}
39
+    public function testAppInstalled() {
40
+        $appManager = $this->container->query('OCP\App\IAppManager');
41
+        $this->assertTrue($appManager->isInstalled('polls'));
42
+    }
43 43
 }
Please login to merge, or discard this patch.