Test Setup Failed
Push — master ( ee1fcd...05bfd7 )
by David
03:35
created
src/Factories/BlockingConsumerFactory.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@
 block discarded – undo
25 25
     /**
26 26
      * Make a new BlockingConsumer instance.
27 27
      *
28
-     * @param \Projectmentor\Quota\Stubs\PayloadInterface $data
29
-     * @return \Projectmentor\Quota\BlockingConsumer
28
+     * @param PayloadInterface $data
29
+     * @return BlockingConsumer
30 30
      */
31 31
     public function make(PayloadInterface $data)
32 32
     {
Please login to merge, or discard this patch.
src/Factories/FileStorageFactory.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
      * Make a new FileStorage instance.
28 28
      *
29 29
      * @param \Projectmentor\Quota\Stubs\PayloadInterface $data;
30
-     * @return \Projectmentor\Quota\Storage\FileStorage
30
+     * @return FileStorage
31 31
      */
32 32
     public function make(PayloadInterface $data)
33 33
     {
Please login to merge, or discard this patch.
src/Factories/TokenBucketFactory.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
     /**
26 26
      * Make a new TokenBucket instance.
27 27
      *
28
-     * @param \Projectmentor\Quota\TokenBucketData $data
28
+     * @param PayloadInterface $data
29 29
      * @return \bandwidthThrottle\tokenBucket\TokenBucket
30 30
      */
31 31
     public function make(PayloadInterface $data)
Please login to merge, or discard this patch.
src/Stubs/BlockingConsumerData.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
     /**
66 66
      * Implements PayloadInterface
67 67
      * emit array payload.
68
-     * @return string
68
+     * @return string[]
69 69
      */
70 70
     public function toArray()
71 71
     {
Please login to merge, or discard this patch.
src/Stubs/TokenBucketData.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     /**
84 84
      * Get the storage instance.
85 85
      *
86
-     * @return \bandwithThrottle\tokenBucket\storage\FileStorage
86
+     * @return \bandwidthThrottle\tokenBucket\storage\FileStorage
87 87
      */
88 88
     public function getStorage()
89 89
     {
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
     /**
104 104
      * Implements PayloadInterface
105 105
      * emit array payload.
106
-     * @return string
106
+     * @return string[]
107 107
      */
108 108
     public function toArray()
109 109
     {
Please login to merge, or discard this patch.
src/QuotaServiceProvider.php 3 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -108,20 +108,20 @@
 block discarded – undo
108 108
     public function bindInterfaces()
109 109
     {
110 110
         $this->app->when(RateFactory::class)
111
-          ->needs('Projectmentor\Quota\Contracts\PayloadInterface')
112
-          ->give(RateData::class);
111
+            ->needs('Projectmentor\Quota\Contracts\PayloadInterface')
112
+            ->give(RateData::class);
113 113
 
114 114
         $this->app->when(FileStorageFactory::class)
115
-          ->needs('Projectmentor\Quota\Contracts\PayloadInterface')
116
-          ->give(FileStorageData::class);
115
+            ->needs('Projectmentor\Quota\Contracts\PayloadInterface')
116
+            ->give(FileStorageData::class);
117 117
 
118 118
         $this->app->when(TokenBucketFactory::class)
119
-          ->needs('Projectmentor\Quota\Contracts\PayloadInterface')
120
-          ->give(TokenBucketData::class);
119
+            ->needs('Projectmentor\Quota\Contracts\PayloadInterface')
120
+            ->give(TokenBucketData::class);
121 121
 
122 122
         $this->app->when(BlockingConsumerFactory::class)
123
-          ->needs('Projectmentor\Quota\Contracts\PayloadInterface')
124
-          ->give(BlockingConsumerData::class);
123
+            ->needs('Projectmentor\Quota\Contracts\PayloadInterface')
124
+            ->give(BlockingConsumerData::class);
125 125
     }
126 126
 
127 127
     /**
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -130,19 +130,19 @@
 block discarded – undo
130 130
      */
131 131
     protected function registerFactories()
132 132
     {
133
-        $this->app->singleton('quota.factory.rate', function ($app) {
133
+        $this->app->singleton('quota.factory.rate', function($app) {
134 134
             return new RateFactory;
135 135
         });
136 136
 
137
-        $this->app->singleton('quota.factory.storage.file', function ($app) {
137
+        $this->app->singleton('quota.factory.storage.file', function($app) {
138 138
             return new FileStorageFactory;
139 139
         });
140 140
 
141
-        $this->app->singleton('quota.factory.tokenbucket', function ($app) {
141
+        $this->app->singleton('quota.factory.tokenbucket', function($app) {
142 142
             return new TokenBucketFactory;
143 143
         });
144 144
 
145
-        $this->app->singleton('quota.factory.blockingconsumer', function ($app) {
145
+        $this->app->singleton('quota.factory.blockingconsumer', function($app) {
146 146
             return new BlockingConsumerFactory;
147 147
         });
148 148
 
Please login to merge, or discard this patch.
Unused Use Statements   -5 removed lines patch added patch discarded remove patch
@@ -11,11 +11,6 @@
 block discarded – undo
11 11
 
12 12
 namespace Projectmentor\Quota;
13 13
 
14
-use bandwidthThrottle\tokenBucket\Rate;
15
-use bandwidthThrottle\tokenBucket\TokenBucket;
16
-use bandwidthThrottle\tokenBucket\BlockingConsumer;
17
-use bandwidthThrottle\tokenBucket\storage\FileStorage;
18
-
19 14
 use Illuminate\Foundation\Application as LaravelApplication;
20 15
 use Laravel\Lumen\Application as LumenApplication;
21 16
 
Please login to merge, or discard this patch.
src/Factories/RateFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,8 @@
 block discarded – undo
51 51
         } else {
52 52
             throw new \InvalidArgumentException(
53 53
                 __CLASS__.'::'.__FUNCTION__.
54
-                ' Invalid constant. Got: ' . $key .
55
-                ' Expected: ' . print_r($constants, 1)
54
+                ' Invalid constant. Got: '.$key.
55
+                ' Expected: '.print_r($constants, 1)
56 56
             );
57 57
         }
58 58
     }
Please login to merge, or discard this patch.
src/Contracts/PayloadInterface.php 1 patch
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -21,6 +21,13 @@
 block discarded – undo
21 21
  */
22 22
 interface PayloadInterface
23 23
 {
24
+    /**
25
+     * @return string
26
+     */
24 27
     public function toJson();
28
+
29
+    /**
30
+     * @return string[]
31
+     */
25 32
     public function toArray();
26 33
 }
Please login to merge, or discard this patch.
src/Stubs/FileStorageData.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
     /**
66 66
      * Implements PayloadInterface
67 67
      * emit array payload.
68
-     * @return string
68
+     * @return string[]
69 69
      */
70 70
     public function toArray()
71 71
     {
Please login to merge, or discard this patch.