Completed
Push — master ( 0d32b3...beb1f2 )
by Matthew
02:46
created
src/Loader/Statistics/AlertStatisticsLoader.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
      * Construct
25 25
      *
26 26
      * @param \Ps2alerts\Api\Repository\AlertRepository    $repository
27
-     * @param \Ps2alerts\Api\Helper\DataFormatter          $dataFormatter
27
+     * @param DataFormatterHelper          $dataFormatter
28 28
      */
29 29
     public function __construct(
30 30
         AlertRepository     $repository,
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 use Ps2alerts\Api\Loader\Statistics\AbstractStatisticsLoader;
6 6
 use Ps2alerts\Api\QueryObjects\QueryObject;
7 7
 use Ps2alerts\Api\Repository\AlertRepository;
8
-use Ps2alerts\Api\Validator\AlertInputValidator;
9 8
 use Ps2alerts\Api\Helper\DataFormatterHelper;
10 9
 
11 10
 class AlertStatisticsLoader extends AbstractStatisticsLoader
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -89,9 +89,9 @@  discard block
 block discarded – undo
89 89
             return $this->getFromRedis($masterRedisKey);
90 90
         }
91 91
 
92
-        $servers  = [1,10,13,17,25,1000,2000];
93
-        $zones    = [2,4,6,8];
94
-        $factions = ['vs','nc','tr','draw'];
92
+        $servers  = [1, 10, 13, 17, 25, 1000, 2000];
93
+        $zones    = [2, 4, 6, 8];
94
+        $factions = ['vs', 'nc', 'tr', 'draw'];
95 95
 
96 96
         $results = [];
97 97
         $this->setCacheExpireTime(3600); // 1 Hour
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
         $maxDate = date('Y-m-d'); // Today unless set
189 189
 
190 190
         // If there is a minimum date set
191
-        if (! empty($post['wheres']['morethan']['ResultEndTime'])) {
191
+        if (!empty($post['wheres']['morethan']['ResultEndTime'])) {
192 192
             if (is_integer($post['wheres']['morethan']['ResultEndTime'])) {
193 193
                 $minDate = date('Y-m-d', $post['wheres']['morethan']['ResultEndTime']);
194 194
             } else {
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
         }
198 198
 
199 199
         // If there is a maximum date set
200
-        if (! empty($post['wheres']['lessthan']['ResultEndTime'])) {
200
+        if (!empty($post['wheres']['lessthan']['ResultEndTime'])) {
201 201
             if (is_integer($post['wheres']['lessthan']['ResultEndTime'])) {
202 202
                 $maxDate = date('Y-m-d', $post['wheres']['lessthan']['ResultEndTime']);
203 203
             } else {
Please login to merge, or discard this patch.
src/Repository/AbstractEndpointRepository.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -70,14 +70,14 @@  discard block
 block discarded – undo
70 70
         $query = $this->newQuery();
71 71
 
72 72
         // Setup select statements
73
-        if (! empty($queryObject->getSelects())) {
73
+        if (!empty($queryObject->getSelects())) {
74 74
             $query->cols($queryObject->getSelects());
75 75
         } else {
76 76
             $query->cols(['*']);
77 77
         }
78 78
 
79 79
         // Workarounds :-/
80
-        if (! empty($queryObject->getFlags())) {
80
+        if (!empty($queryObject->getFlags())) {
81 81
             if ($queryObject->getFlags() === 'outfitIDs') {
82 82
                 // Prevent the VS, NC and TR "no outfit" workaround
83 83
                 $queryObject->addWhere([
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         }
90 90
 
91 91
         // Setup where statements
92
-        if (! empty($queryObject->getWheres())) {
92
+        if (!empty($queryObject->getWheres())) {
93 93
             foreach ($queryObject->getWheres() as $where) {
94 94
                 $col = $where['col'];
95 95
 
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
                 // Generate a UUID so that any columns that are used multiple
104 104
                 // times always have unique values. Tiny overhead for the benefit
105 105
                 $uuid = $this->getUuidDriver()->uuid4()->toString();
106
-                $bind = str_replace('-', '', $col.$uuid);
106
+                $bind = str_replace('-', '', $col . $uuid);
107 107
 
108 108
                 $op = (isset($where['op']) ? $where['op'] : '=');
109 109
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         }
114 114
 
115 115
         // Setup where statements
116
-        if (! empty($queryObject->getWhereIns())) {
116
+        if (!empty($queryObject->getWhereIns())) {
117 117
             foreach ($queryObject->getWhereIns() as $whereIn) {
118 118
                 $col = $whereIn['col'];
119 119
 
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         }
130 130
 
131 131
         // Set up order statement
132
-        if (! empty($queryObject->getOrderBy())) {
132
+        if (!empty($queryObject->getOrderBy())) {
133 133
             $orderBy = $queryObject->getOrderBy();
134 134
             if ($orderBy === 'primary') {
135 135
                 $orderBy = $this->getPrimaryKey();
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
             ]);
144 144
         }
145 145
 
146
-        if (! empty($queryObject->getLimit())) {
146
+        if (!empty($queryObject->getLimit())) {
147 147
             // Only set a limit if it's required
148 148
             if ($queryObject->getLimit() !== 'unlimited') {
149 149
                 $query->limit($queryObject->getLimit());
Please login to merge, or discard this patch.
src/ServiceProvider/UuidServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
      */
20 20
     public function register()
21 21
     {
22
-        $this->getContainer()->add('Ramsey\Uuid\Uuid', function () {
22
+        $this->getContainer()->add('Ramsey\Uuid\Uuid', function() {
23 23
             $uuid = Uuid::Uuid4();
24 24
             return $uuid;
25 25
         });
Please login to merge, or discard this patch.