Test Setup Failed
Pull Request — master (#1)
by
unknown
06:50
created
src/Quota.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -98,12 +98,12 @@
 block discarded – undo
98 98
         return $result;
99 99
     }
100 100
 
101
-   /**
102
-    * Public interface.
103
-    *
104
-    * NOTE: this class and method are really abstract,
105
-    * but we leave it instantiable for easier testing. 
106
-    */ 
101
+    /**
102
+     * Public interface.
103
+     *
104
+     * NOTE: this class and method are really abstract,
105
+     * but we leave it instantiable for easier testing. 
106
+     */ 
107 107
     public function enforce()
108 108
     {
109 109
         //Override this in descendants.
Please login to merge, or discard this patch.
src/QuotaServiceProvider.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -87,15 +87,15 @@  discard block
 block discarded – undo
87 87
         } 
88 88
     }
89 89
 
90
-     /**
91
-     * Register a database migration path.
92
-     *
93
-     * NOTE: This function is already part of 5.4
94
-     * it is backported here for 5.2
95
-     *
96
-     * @param  array|string  $paths
97
-     * @return void
98
-     */
90
+        /**
91
+         * Register a database migration path.
92
+         *
93
+         * NOTE: This function is already part of 5.4
94
+         * it is backported here for 5.2
95
+         *
96
+         * @param  array|string  $paths
97
+         * @return void
98
+         */
99 99
     //protected function loadMigrationsFrom($paths)
100 100
     //{
101 101
     //    dump(__CLASS__.'::'.__FUNCTION__);
@@ -146,20 +146,20 @@  discard block
 block discarded – undo
146 146
     public function bindInterfaces()
147 147
     {
148 148
         $this->app->when(RateFactory::class)
149
-          ->needs('Projectmentor\Quota\Contracts\PayloadInterface')
150
-          ->give(RateData::class);
149
+            ->needs('Projectmentor\Quota\Contracts\PayloadInterface')
150
+            ->give(RateData::class);
151 151
 
152 152
         $this->app->when(FileStorageFactory::class)
153
-          ->needs('Projectmentor\Quota\Contracts\PayloadInterface')
154
-          ->give(FileStorageData::class);
153
+            ->needs('Projectmentor\Quota\Contracts\PayloadInterface')
154
+            ->give(FileStorageData::class);
155 155
 
156 156
         $this->app->when(TokenBucketFactory::class)
157
-          ->needs('Projectmentor\Quota\Contracts\PayloadInterface')
158
-          ->give(TokenBucketData::class);
157
+            ->needs('Projectmentor\Quota\Contracts\PayloadInterface')
158
+            ->give(TokenBucketData::class);
159 159
 
160 160
         $this->app->when(BlockingConsumerFactory::class)
161
-          ->needs('Projectmentor\Quota\Contracts\PayloadInterface')
162
-          ->give(BlockingConsumerData::class);
161
+            ->needs('Projectmentor\Quota\Contracts\PayloadInterface')
162
+            ->give(BlockingConsumerData::class);
163 163
     }
164 164
 
165 165
     /**
Please login to merge, or discard this patch.
src/Console/Commands/ResetQuotaLog.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -84,23 +84,23 @@
 block discarded – undo
84 84
             if(! $this->sqliteUpdateDidChange($changes))
85 85
             {
86 86
                 $sql = 'INSERT INTO quotalog' .
87
-                  ' (' .
88
-                  ' `date`' .
89
-                  ', `connection`' .
90
-                  ', `hits`' .
91
-                  ', `misses`' .
92
-                  ', `created_at`' .
93
-                  ', `updated_at`' .
94
-                  ')' . 
95
-                  ' VALUES' .
96
-                  ' (' . 
97
-                  ' :date' .
98
-                  ', :connection' .
99
-                  ', :hits' .
100
-                  ', :misses' .
101
-                  ', :created_at' .  
102
-                  ', :updated_at' .
103
-                  ')';
87
+                    ' (' .
88
+                    ' `date`' .
89
+                    ', `connection`' .
90
+                    ', `hits`' .
91
+                    ', `misses`' .
92
+                    ', `created_at`' .
93
+                    ', `updated_at`' .
94
+                    ')' . 
95
+                    ' VALUES' .
96
+                    ' (' . 
97
+                    ' :date' .
98
+                    ', :connection' .
99
+                    ', :hits' .
100
+                    ', :misses' .
101
+                    ', :created_at' .  
102
+                    ', :updated_at' .
103
+                    ')';
104 104
 
105 105
                 $this->doUpsertStatement($sql);
106 106
             }
Please login to merge, or discard this patch.
src/PeriodicQuota.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -159,17 +159,17 @@  discard block
 block discarded – undo
159 159
 
160 160
         if($this->limit < ($hits + 1))
161 161
         {
162
-           $this->miss($stats->misses);
163
-           throw new \ErrorException(
164
-               __CLASS__ . '::' . __FUNCTION__ .
165
-               ' Overquota. Exceeded daily limit: ' . $this->limit);
162
+            $this->miss($stats->misses);
163
+            throw new \ErrorException(
164
+                __CLASS__ . '::' . __FUNCTION__ .
165
+                ' Overquota. Exceeded daily limit: ' . $this->limit);
166 166
         }
167 167
         else
168 168
         {
169 169
             $this->hit($stats->hits);
170 170
             $result = true;
171 171
         }
172
-         return isset($result);
172
+            return isset($result);
173 173
     }
174 174
 
175 175
     /**
@@ -186,9 +186,9 @@  discard block
 block discarded – undo
186 186
     public function getStats($date)
187 187
     {
188 188
         return DB::table('quotalog')
189
-           ->where('date', $date)
190
-           ->where('connection', $this->connection)
191
-           ->first();
189
+            ->where('date', $date)
190
+            ->where('connection', $this->connection)
191
+            ->first();
192 192
     }
193 193
 
194 194
     /**
Please login to merge, or discard this patch.