Completed
Pull Request — master (#7978)
by Alexey
06:36
created
ORM/Mapping/Factory/Strategy/FileWriterClassMetadataGeneratorStrategy.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
         $this->ensureDirectoryIsReady(dirname($filePath));
38 38
 
39
-        $tmpFileName = $filePath . '.' . uniqid('', true);
39
+        $tmpFileName = $filePath.'.'.uniqid('', true);
40 40
 
41 41
         file_put_contents($tmpFileName, $sourceCode);
42 42
         @chmod($tmpFileName, 0664);
@@ -50,11 +50,11 @@  discard block
 block discarded – undo
50 50
      */
51 51
     private function ensureDirectoryIsReady(string $directory)
52 52
     {
53
-        if (! is_dir($directory) && (@mkdir($directory, 0775, true) === false)) {
53
+        if ( ! is_dir($directory) && (@mkdir($directory, 0775, true) === false)) {
54 54
             throw new RuntimeException(sprintf('Your metadata directory "%s" must be writable', $directory));
55 55
         }
56 56
 
57
-        if (! is_writable($directory)) {
57
+        if ( ! is_writable($directory)) {
58 58
             throw new RuntimeException(sprintf('Your proxy directory "%s" must be writable', $directory));
59 59
         }
60 60
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/DefaultEntityListenerResolver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
      */
43 43
     public function register($object)
44 44
     {
45
-        if (! is_object($object)) {
45
+        if ( ! is_object($object)) {
46 46
             throw new InvalidArgumentException(sprintf('An object was expected, but got "%s".', gettype($object)));
47 47
         }
48 48
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Exporter/VariableExporter.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -24,30 +24,30 @@
 block discarded – undo
24 24
      */
25 25
     public function export($value, int $indentationLevel = 0) : string
26 26
     {
27
-        if (! is_array($value)) {
27
+        if ( ! is_array($value)) {
28 28
             return var_export($value, true);
29 29
         }
30 30
 
31 31
         $indentation  = str_repeat(self::INDENTATION, $indentationLevel);
32
-        $longestKey   = array_reduce(array_keys($value), static function ($k, $v) {
32
+        $longestKey   = array_reduce(array_keys($value), static function($k, $v) {
33 33
             return (string) (strlen((string) $k) > strlen((string) $v) ? $k : $v);
34 34
         });
35 35
         $maxKeyLength = strlen($longestKey) + (is_numeric($longestKey) ? 0 : 2);
36 36
 
37 37
         $lines = [];
38 38
 
39
-        $lines[] = $indentation . '[';
39
+        $lines[] = $indentation.'[';
40 40
 
41 41
         foreach ($value as $entryKey => $entryValue) {
42 42
             $lines[] = sprintf(
43 43
                 '%s%s => %s,',
44
-                $indentation . self::INDENTATION,
44
+                $indentation.self::INDENTATION,
45 45
                 str_pad(var_export($entryKey, true), $maxKeyLength),
46 46
                 ltrim($this->export($entryValue, $indentationLevel + 1))
47 47
             );
48 48
         }
49 49
 
50
-        $lines[] = $indentation . ']';
50
+        $lines[] = $indentation.']';
51 51
 
52 52
         return implode(PHP_EOL, $lines);
53 53
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Persisters/SqlExpressionVisitor.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -74,13 +74,13 @@
 block discarded – undo
74 74
 
75 75
         switch ($expr->getType()) {
76 76
             case CompositeExpression::TYPE_AND:
77
-                return '(' . implode(' AND ', $expressionList) . ')';
77
+                return '('.implode(' AND ', $expressionList).')';
78 78
 
79 79
             case CompositeExpression::TYPE_OR:
80
-                return '(' . implode(' OR ', $expressionList) . ')';
80
+                return '('.implode(' OR ', $expressionList).')';
81 81
 
82 82
             default:
83
-                throw new RuntimeException('Unknown composite ' . $expr->getType());
83
+                throw new RuntimeException('Unknown composite '.$expr->getType());
84 84
         }
85 85
     }
86 86
 
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/Lexer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@
 block discarded – undo
162 162
 
163 163
             // Recognize identifiers, aliased or qualified names
164 164
             case ctype_alpha($value[0]) || $value[0] === '_' || $value[0] === '\\':
165
-                $name = 'Doctrine\ORM\Query\Lexer::T_' . strtoupper($value);
165
+                $name = 'Doctrine\ORM\Query\Lexer::T_'.strtoupper($value);
166 166
 
167 167
                 if (defined($name)) {
168 168
                     $type = constant($name);
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/Expr/Base.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -63,12 +63,12 @@  discard block
 block discarded – undo
63 63
      */
64 64
     public function add($arg)
65 65
     {
66
-        if ($arg !== null && (! $arg instanceof self || $arg->count() > 0)) {
66
+        if ($arg !== null && ( ! $arg instanceof self || $arg->count() > 0)) {
67 67
             // If we decide to keep Expr\Base instances, we can use this check
68
-            if (! is_string($arg)) {
68
+            if ( ! is_string($arg)) {
69 69
                 $class = get_class($arg);
70 70
 
71
-                if (! in_array($class, $this->allowedClasses, true)) {
71
+                if ( ! in_array($class, $this->allowedClasses, true)) {
72 72
                     throw new InvalidArgumentException(
73 73
                         sprintf("Expression of type '%s' not allowed in this context.", $class)
74 74
                     );
@@ -98,6 +98,6 @@  discard block
 block discarded – undo
98 98
             return (string) $this->parts[0];
99 99
         }
100 100
 
101
-        return $this->preSeparator . implode($this->separator, $this->parts) . $this->postSeparator;
101
+        return $this->preSeparator.implode($this->separator, $this->parts).$this->postSeparator;
102 102
     }
103 103
 }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/FilterCollection.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -81,11 +81,11 @@  discard block
 block discarded – undo
81 81
      */
82 82
     public function enable($name)
83 83
     {
84
-        if (! $this->has($name)) {
85
-            throw new InvalidArgumentException("Filter '" . $name . "' does not exist.");
84
+        if ( ! $this->has($name)) {
85
+            throw new InvalidArgumentException("Filter '".$name."' does not exist.");
86 86
         }
87 87
 
88
-        if (! $this->isEnabled($name)) {
88
+        if ( ! $this->isEnabled($name)) {
89 89
             $filterClass = $this->config->getFilterClassName($name);
90 90
 
91 91
             $this->enabledFilters[$name] = new $filterClass($this->em);
@@ -133,8 +133,8 @@  discard block
 block discarded – undo
133 133
      */
134 134
     public function getFilter($name)
135 135
     {
136
-        if (! $this->isEnabled($name)) {
137
-            throw new InvalidArgumentException("Filter '" . $name . "' is not enabled.");
136
+        if ( ! $this->isEnabled($name)) {
137
+            throw new InvalidArgumentException("Filter '".$name."' is not enabled.");
138 138
         }
139 139
 
140 140
         return $this->enabledFilters[$name];
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
         $filterHash = '';
188 188
 
189 189
         foreach ($this->enabledFilters as $name => $filter) {
190
-            $filterHash .= $name . $filter;
190
+            $filterHash .= $name.$filter;
191 191
         }
192 192
 
193 193
         return $filterHash;
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/Filter/SQLFilter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,8 +83,8 @@
 block discarded – undo
83 83
      */
84 84
     final public function getParameter($name)
85 85
     {
86
-        if (! isset($this->parameters[$name])) {
87
-            throw new InvalidArgumentException("Parameter '" . $name . "' does not exist.");
86
+        if ( ! isset($this->parameters[$name])) {
87
+            throw new InvalidArgumentException("Parameter '".$name."' does not exist.");
88 88
         }
89 89
 
90 90
         return $this->em->getConnection()->quote($this->parameters[$name]['value'], $this->parameters[$name]['type']);
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Query/Exec/MultiTableDeleteExecutor.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -57,8 +57,8 @@  discard block
 block discarded – undo
57 57
         // 1. Create an INSERT INTO temptable ... SELECT identifiers WHERE $AST->getWhereClause()
58 58
         $sqlWalker->setSQLTableAlias($primaryClass->getTableName(), 'i0', $primaryDqlAlias);
59 59
 
60
-        $this->insertSql = 'INSERT INTO ' . $tempTable . ' (' . $idColumnNameList . ')'
61
-                . ' SELECT i0.' . implode(', i0.', array_keys($idColumns));
60
+        $this->insertSql = 'INSERT INTO '.$tempTable.' ('.$idColumnNameList.')'
61
+                . ' SELECT i0.'.implode(', i0.', array_keys($idColumns));
62 62
 
63 63
         $rangeDecl        = new AST\RangeVariableDeclaration($primaryClass->getClassName(), $primaryDqlAlias);
64 64
         $fromClause       = new AST\FromClause([new AST\IdentificationVariableDeclaration($rangeDecl, null, [])]);
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         // 3. Create and store DELETE statements
81 81
         $hierarchyClasses = array_merge(
82 82
             array_map(
83
-                static function ($className) use ($em) {
83
+                static function($className) use ($em) {
84 84
                     return $em->getClassMetadata($className);
85 85
                 },
86 86
                 array_reverse($primaryClass->getSubClasses())
@@ -103,8 +103,8 @@  discard block
 block discarded – undo
103 103
             ];
104 104
         }
105 105
 
106
-        $this->createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL() . ' ' . $tempTable . ' ('
107
-                . $platform->getColumnDeclarationListSQL($columnDefinitions) . ')';
106
+        $this->createTempTableSql = $platform->getCreateTemporaryTableSnippetSQL().' '.$tempTable.' ('
107
+                . $platform->getColumnDeclarationListSQL($columnDefinitions).')';
108 108
 
109 109
         $this->dropTempTableSql = $platform->getDropTemporaryTableSQL($tempTable);
110 110
     }
Please login to merge, or discard this patch.