Completed
Pull Request — master (#6208)
by Pierre
10:51
created
lib/Doctrine/ORM/EntityRepository.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -301,14 +301,14 @@
 block discarded – undo
301 301
      */
302 302
     private function resolveMagicCall($method, $by, array $arguments)
303 303
     {
304
-        if (! $arguments) {
305
-            throw ORMException::findByRequiresParameter($method . $by);
304
+        if ( ! $arguments) {
305
+            throw ORMException::findByRequiresParameter($method.$by);
306 306
         }
307 307
 
308 308
         $fieldName = lcfirst(Inflector::classify($by));
309 309
 
310
-        if (! ($this->_class->hasField($fieldName) || $this->_class->hasAssociation($fieldName))) {
311
-            throw ORMException::invalidMagicCall($this->_entityName, $fieldName, $method . $by);
310
+        if ( ! ($this->_class->hasField($fieldName) || $this->_class->hasAssociation($fieldName))) {
311
+            throw ORMException::invalidMagicCall($this->_entityName, $fieldName, $method.$by);
312 312
         }
313 313
 
314 314
         return $this->$method([$fieldName => $arguments[0]], ...array_slice($arguments, 1));
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Mapping/AbstractMappingDriverTest.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,6 @@
 block discarded – undo
33 33
     }
34 34
 
35 35
     /**
36
-     * @param \Doctrine\ORM\EntityManager $entityClassName
37 36
      * @return \Doctrine\ORM\Mapping\ClassMetadataFactory
38 37
      */
39 38
     protected function createClassMetadataFactory(EntityManager $em = null)
Please login to merge, or discard this patch.
lib/Doctrine/ORM/EntityManager.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -224,8 +224,8 @@  discard block
 block discarded – undo
224 224
      */
225 225
     public function transactional($func)
226 226
     {
227
-        if (!is_callable($func)) {
228
-            throw new \InvalidArgumentException('Expected argument of type "callable", got "' . gettype($func) . '"');
227
+        if ( ! is_callable($func)) {
228
+            throw new \InvalidArgumentException('Expected argument of type "callable", got "'.gettype($func).'"');
229 229
         }
230 230
 
231 231
         $this->conn->beginTransaction();
@@ -753,7 +753,7 @@  discard block
 block discarded – undo
753 753
      */
754 754
     public function isOpen()
755 755
     {
756
-        return (!$this->closed);
756
+        return ( ! $this->closed);
757 757
     }
758 758
 
759 759
     /**
@@ -864,7 +864,7 @@  discard block
 block discarded – undo
864 864
                 sprintf(
865 865
                     'Invalid $connection argument of type %s given%s.',
866 866
                     is_object($connection) ? get_class($connection) : gettype($connection),
867
-                    is_object($connection) ? '' : ': "' . $connection . '"'
867
+                    is_object($connection) ? '' : ': "'.$connection.'"'
868 868
                 )
869 869
             );
870 870
         }
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Tools/EntityGeneratorTest.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1104,7 +1104,7 @@
 block discarded – undo
1104 1104
 
1105 1105
     /**
1106 1106
      * @param string $type
1107
-     * @param \ReflectionProperty $method
1107
+     * @param \ReflectionMethod $method
1108 1108
      */
1109 1109
     private function assertPhpDocParamType($type, \ReflectionMethod $method)
1110 1110
     {
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/Locking/GearmanLockTest.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -148,6 +148,9 @@  discard block
 block discarded – undo
148 148
         );
149 149
     }
150 150
 
151
+    /**
152
+     * @param string $dql
153
+     */
151 154
     protected function asyncDqlWithLock($dql, $params, $lockMode)
152 155
     {
153 156
         $this->startJob('dqlWithLock', [
@@ -168,6 +171,9 @@  discard block
 block discarded – undo
168 171
         );
169 172
     }
170 173
 
174
+    /**
175
+     * @param string $fn
176
+     */
171 177
     protected function startJob($fn, $fixture)
172 178
     {
173 179
         $this->gearman->addTask($fn, serialize(
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/SQLFilterTest.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -176,6 +176,9 @@  discard block
 block discarded – undo
176 176
         $this->assertFalse($em->getFilters()->isEnabled("foo_filter"));
177 177
     }
178 178
 
179
+    /**
180
+     * @param EntityManager $em
181
+     */
179 182
     protected function configureFilters($em)
180 183
     {
181 184
         // Add filters to the configuration of the EM
@@ -889,6 +892,9 @@  discard block
 block discarded – undo
889 892
         $this->assertEquals(2, count($manager->managedContracts->slice(0, 10)));
890 893
     }
891 894
 
895
+    /**
896
+     * @param string $name
897
+     */
892 898
     private function usePersonNameFilter($name)
893 899
     {
894 900
         // Enable the filter
Please login to merge, or discard this patch.
tests/Doctrine/Tests/ORM/Functional/TypeTest.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace Doctrine\Tests\ORM\Functional;
4 4
 
5 5
 use Doctrine\DBAL\Types\Type as DBALType;
6
-use Doctrine\ORM\Mapping\AssociationMapping;
7 6
 use Doctrine\Tests\Models\Generic\BooleanModel;
8 7
 use Doctrine\Tests\Models\Generic\DateTimeModel;
9 8
 use Doctrine\Tests\Models\Generic\DecimalModel;
Please login to merge, or discard this patch.
tools/sandbox/bootstrap.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,8 +5,8 @@  discard block
 block discarded – undo
5 5
 
6 6
 // Path to composer autoloader. You can use different provided by your favorite framework,
7 7
 // if you want to.
8
-$loaderPath = __DIR__ . '/../../vendor/autoload.php';
9
-if(!is_readable($loaderPath)){
8
+$loaderPath = __DIR__.'/../../vendor/autoload.php';
9
+if ( ! is_readable($loaderPath)) {
10 10
     throw new LogicException('Run php composer.phar install at first');
11 11
 }
12 12
 $loader = require $loaderPath;
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 $config = new \Doctrine\ORM\Configuration();
20 20
 
21 21
 // Set up Metadata Drivers
22
-$driverImpl = $config->newDefaultAnnotationDriver([__DIR__ . "/Entities"]);
22
+$driverImpl = $config->newDefaultAnnotationDriver([__DIR__."/Entities"]);
23 23
 $config->setMetadataDriverImpl($driverImpl);
24 24
 
25 25
 // Set up caches, depending on $debug variable.
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 $config->setQueryCacheImpl($cache);
30 30
 
31 31
 // Proxy configuration
32
-$config->setProxyDir(__DIR__ . '/Proxies');
32
+$config->setProxyDir(__DIR__.'/Proxies');
33 33
 $config->setProxyNamespace('Proxies');
34 34
 
35 35
 // Database connection information
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/AST/Functions/ConcatFunction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
             $args[] = $sqlWalker->walkStringPrimary($expression);
54 54
         }
55 55
 
56
-        return call_user_func_array([$platform,'getConcatExpression'], $args);
56
+        return call_user_func_array([$platform, 'getConcatExpression'], $args);
57 57
     }
58 58
 
59 59
     /**
Please login to merge, or discard this patch.