Completed
Branch dbal-improvement (0b9e21)
by Anton
05:00
created
source/Spiral/Core/Component.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
      * Get instance of container associated with given object, uses global container as fallback
29 29
      * if not. Method generally used by traits.
30 30
      *
31
-     * @return ContainerInterface|null
31
+     * @return ContainerInterface
32 32
      */
33 33
     protected function container()
34 34
     {
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Spiral Framework.
4
- *
5
- * @license   MIT
6
- * @author    Anton Titov (Wolfy-J)
7
- */
3
+     * Spiral Framework.
4
+     *
5
+     * @license   MIT
6
+     * @author    Anton Titov (Wolfy-J)
7
+     */
8 8
 namespace Spiral\Core;
9 9
 
10 10
 use Interop\Container\ContainerInterface;
Please login to merge, or discard this patch.
source/Spiral/Database/Builders/SelectQuery.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
      * Set table names SELECT query should be performed for. Table names can be provided with
59 59
      * specified alias (AS construction).
60 60
      *
61
-     * @param array|string|mixed $tables Array of names, comma separated string or set of
61
+     * @param string $tables Array of names, comma separated string or set of
62 62
      *                                   parameters.
63 63
      * @return $this
64 64
      */
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Spiral Framework.
4
- *
5
- * @license   MIT
6
- * @author    Anton Titov (Wolfy-J)
7
- */
3
+     * Spiral Framework.
4
+     *
5
+     * @license   MIT
6
+     * @author    Anton Titov (Wolfy-J)
7
+     */
8 8
 namespace Spiral\Database\Builders;
9 9
 
10 10
 use Spiral\Database\Builders\Prototypes\AbstractSelect;
Please login to merge, or discard this patch.
source/Spiral/Database/Builders/Traits/JoinsTrait.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
      * such methods.
233 233
      *
234 234
      * @see AbstractWhere
235
-     * @param string|mixed $joined   Joined column or expression.
235
+     * @param string $joined   Joined column or expression.
236 236
      * @param mixed        $variousA Operator or value.
237 237
      * @param mixed        $variousB Value, if operator specified.
238 238
      * @param mixed        $variousC Required only in between statements.
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
      * @param string        $joiner     Boolean joiner (AND | OR).
301 301
      * @param array         $parameters Set of parameters collected from where functions.
302 302
      * @param array         $tokens     Array to aggregate compiled tokens. Reference.
303
-     * @param \Closure|null $wrapper    Callback or closure used to wrap/collect every potential
303
+     * @param callable $wrapper    Callback or closure used to wrap/collect every potential
304 304
      *                                  parameter.
305 305
      * @throws BuilderException
306 306
      */
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Spiral Framework.
4
- *
5
- * @license   MIT
6
- * @author    Anton Titov (Wolfy-J)
7
- */
3
+     * Spiral Framework.
4
+     *
5
+     * @license   MIT
6
+     * @author    Anton Titov (Wolfy-J)
7
+     */
8 8
 namespace Spiral\Database\Builders\Traits;
9 9
 
10 10
 use Spiral\Database\Entities\QueryBuilder;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
      */
319 319
     private function onWrapper()
320 320
     {
321
-        return function ($parameter) {
321
+        return function($parameter) {
322 322
             if ($parameter instanceof FragmentInterface) {
323 323
                 return $parameter;
324 324
             }
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
      */
335 335
     private function whereWrapper()
336 336
     {
337
-        return function ($parameter) {
337
+        return function($parameter) {
338 338
             if ($parameter instanceof FragmentInterface) {
339 339
                 //We are only not creating bindings for plan fragments
340 340
                 if (!$parameter instanceof ParameterInterface && !$parameter instanceof QueryBuilder) {
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
             }
344 344
 
345 345
             //Wrapping all values with ParameterInterface
346
-            $parameter = new Parameter($parameter, Parameter::DETECT_TYPE);;
346
+            $parameter = new Parameter($parameter, Parameter::DETECT_TYPE); ;
347 347
 
348 348
             //Let's store to sent to driver when needed
349 349
             $this->onParameters[] = $parameter;
Please login to merge, or discard this patch.
source/Spiral/Database/Drivers/SQLServer/QueryCompiler.php 2 patches
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -113,6 +113,8 @@
 block discarded – undo
113 113
      * {@inheritdoc}
114 114
      *
115 115
      * @link http://stackoverflow.com/questions/2135418/equivalent-of-limit-and-offset-for-sql-server
116
+     * @param integer $limit
117
+     * @param integer $offset
116 118
      */
117 119
     protected function compileLimit($limit, $offset, $rowNumber = null)
118 120
     {
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Spiral Framework.
4
- *
5
- * @license   MIT
6
- * @author    Anton Titov (Wolfy-J)
7
- */
3
+     * Spiral Framework.
4
+     *
5
+     * @license   MIT
6
+     * @author    Anton Titov (Wolfy-J)
7
+     */
8 8
 namespace Spiral\Database\Drivers\SQLServer;
9 9
 
10 10
 use Psr\Log\LoggerAwareInterface;
Please login to merge, or discard this patch.
source/Spiral/Database/Entities/Schemas/AbstractCommander.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -228,7 +228,7 @@
 block discarded – undo
228 228
      * Execute statement.
229 229
      *
230 230
      * @param string $statement
231
-     * @param array  $parameters
231
+     * @param string[]  $parameters
232 232
      * @return \PDOStatement
233 233
      */
234 234
     protected function run($statement, array $parameters = [])
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Spiral Framework.
4
- *
5
- * @license   MIT
6
- * @author    Anton Titov (Wolfy-J)
7
- */
3
+     * Spiral Framework.
4
+     *
5
+     * @license   MIT
6
+     * @author    Anton Titov (Wolfy-J)
7
+     */
8 8
 namespace Spiral\Database\Entities\Schemas;
9 9
 
10 10
 use Spiral\Database\Entities\Driver;
Please login to merge, or discard this patch.
source/Spiral/Database/Entities/Schemas/AbstractTable.php 2 patches
Doc Comments   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -161,6 +161,7 @@  discard block
 block discarded – undo
161 161
      * {@inheritdoc}
162 162
      *
163 163
      * Automatically forces prefix value.
164
+     * @param string $name
164 165
      */
165 166
     public function setName($name)
166 167
     {
@@ -280,7 +281,7 @@  discard block
 block discarded – undo
280 281
      * $table->unique(['key', 'key2']);
281 282
      *
282 283
      * @param mixed $columns Column name, or array of columns.
283
-     * @return AbstractColumn|null
284
+     * @return AbstractIndex
284 285
      */
285 286
     public function unique($columns)
286 287
     {
@@ -294,7 +295,7 @@  discard block
 block discarded – undo
294 295
      * name.
295 296
      *
296 297
      * @param string $column Column name.
297
-     * @return AbstractReference|null
298
+     * @return AbstractReference
298 299
      */
299 300
     public function foreign($column)
300 301
     {
@@ -490,7 +491,7 @@  discard block
 block discarded – undo
490 491
     }
491 492
 
492 493
     /**
493
-     * @return AbstractColumn|string
494
+     * @return string
494 495
      */
495 496
     public function __toString()
496 497
     {
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Spiral Framework.
4
- *
5
- * @license   MIT
6
- * @author    Anton Titov (Wolfy-J)
7
- */
3
+     * Spiral Framework.
4
+     *
5
+     * @license   MIT
6
+     * @author    Anton Titov (Wolfy-J)
7
+     */
8 8
 namespace Spiral\Database\Entities\Schemas;
9 9
 
10 10
 use Psr\Log\LoggerAwareInterface;
Please login to merge, or discard this patch.
source/Spiral/Database/Entities/Table.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@
 block discarded – undo
126 126
      *
127 127
      * @param array $columns Array of columns.
128 128
      * @param array $rowsets Array of rowsets.
129
-     * @return mixed
129
+     * @return integer
130 130
      */
131 131
     public function batchInsert(array $columns = [], array $rowsets = [])
132 132
     {
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Spiral Framework.
4
- *
5
- * @license   MIT
6
- * @author    Anton Titov (Wolfy-J)
7
- */
3
+     * Spiral Framework.
4
+     *
5
+     * @license   MIT
6
+     * @author    Anton Titov (Wolfy-J)
7
+     */
8 8
 namespace Spiral\Database\Entities;
9 9
 
10 10
 use Spiral\Database\Builders\DeleteQuery;
Please login to merge, or discard this patch.
source/Spiral/ODM/Entities/Collection.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -257,7 +257,7 @@
 block discarded – undo
257 257
     /**
258 258
      * {@inheritdoc}
259 259
      *
260
-     * @return DocumentCursor|Document[]
260
+     * @return DocumentCursor
261 261
      */
262 262
     public function getIterator()
263 263
     {
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Spiral Framework.
4
- *
5
- * @license   MIT
6
- * @author    Anton Titov (Wolfy-J)
7
- */
3
+     * Spiral Framework.
4
+     *
5
+     * @license   MIT
6
+     * @author    Anton Titov (Wolfy-J)
7
+     */
8 8
 namespace Spiral\ODM\Entities;
9 9
 
10 10
 use Psr\Log\LoggerAwareInterface;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@
 block discarded – undo
150 150
      */
151 151
     public function query(array $query = [])
152 152
     {
153
-        array_walk_recursive($query, function (&$value) {
153
+        array_walk_recursive($query, function(&$value) {
154 154
             if ($value instanceof \DateTime) {
155 155
                 //MongoDate is always UTC, which is good :)
156 156
                 $value = new \MongoDate($value->getTimestamp());
Please login to merge, or discard this patch.
source/Spiral/ODM/Entities/Compositor.php 2 patches
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
     /**
139 139
      * Get composition parent.
140 140
      *
141
-     * @return Document|null
141
+     * @return EntityInterface
142 142
      */
143 143
     public function getParent()
144 144
     {
@@ -485,7 +485,7 @@  discard block
 block discarded – undo
485 485
     /**
486 486
      * {@inheritdoc}
487 487
      *
488
-     * @return Document[]
488
+     * @return \ArrayIterator
489 489
      */
490 490
     public function getIterator()
491 491
     {
@@ -577,7 +577,7 @@  discard block
 block discarded – undo
577 577
      * Example:
578 578
      * $user->cards->findOne(['active' => true]);
579 579
      *
580
-     * @param array|DocumentEntity $query
580
+     * @param DocumentEntity $query
581 581
      * @return null|DocumentEntity
582 582
      */
583 583
     public function findOne($query = [])
@@ -595,7 +595,7 @@  discard block
 block discarded – undo
595 595
      *
596 596
      * @param DocumentEntity $document
597 597
      * @param bool           $resetState Set to true to reset compositor solid state.
598
-     * @return $this|DocumentEntity[]
598
+     * @return Compositor
599 599
      * @throws CompositorException
600 600
      */
601 601
     public function push(DocumentEntity $document, $resetState = true)
@@ -630,7 +630,7 @@  discard block
 block discarded – undo
630 630
      *
631 631
      * @param array|DocumentEntity $query
632 632
      * @param bool                 $resetState Set to true to reset compositor solid state.
633
-     * @return $this|DocumentEntity[]
633
+     * @return Compositor
634 634
      * @throws CompositorException
635 635
      */
636 636
     public function pull($query, $resetState = true)
@@ -675,7 +675,7 @@  discard block
 block discarded – undo
675 675
      *
676 676
      * @param DocumentEntity $document
677 677
      * @param bool           $resetState Set to true to reset compositor solid state.
678
-     * @return $this|DocumentEntity[]
678
+     * @return Compositor
679 679
      * @throws CompositorException
680 680
      */
681 681
     public function addToSet(DocumentEntity $document, $resetState = true)
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Spiral Framework.
4
- *
5
- * @license   MIT
6
- * @author    Anton Titov (Wolfy-J)
7
- * @copyright �2009-2015
8
- */
3
+     * Spiral Framework.
4
+     *
5
+     * @license   MIT
6
+     * @author    Anton Titov (Wolfy-J)
7
+     * @copyright �2009-2015
8
+     */
9 9
 namespace Spiral\ODM\Entities;
10 10
 
11 11
 use Interop\Container\ContainerInterface;
Please login to merge, or discard this patch.