Passed
Push — fix-FRAM-102-disallow-using-sa... ( a4f1ec )
by Vincent
20:15
created
src/Mapper/NameResolver/SuffixResolver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
      */
26 26
     public function resolve(string $entityClass): string
27 27
     {
28
-        return $entityClass . $this->suffix;
28
+        return $entityClass.$this->suffix;
29 29
     }
30 30
     
31 31
     /**
Please login to merge, or discard this patch.
src/Mapper/SingleTableInheritanceMapper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         $relation = parent::relation($relationName);
53 53
         
54 54
         if ($this->isDiscriminatedMapper() && $relation['type'] == Relation::BY_INHERITANCE) {
55
-            throw new \RuntimeException('Relation type not allowed from relation "' . $relationName . '" in ' . $this->getEntityClass());
55
+            throw new \RuntimeException('Relation type not allowed from relation "'.$relationName.'" in '.$this->getEntityClass());
56 56
         }
57 57
 
58 58
         return $relation;
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
         $discriminatorField = $this->metadata()->attributes[$this->discriminatorColumn]['field'];
156 156
 
157 157
         if (empty($data[$discriminatorField])) {
158
-            throw new \Exception('Discriminator field "' . $discriminatorField . '" not found');
158
+            throw new \Exception('Discriminator field "'.$discriminatorField.'" not found');
159 159
         }
160 160
 
161 161
         return $data[$discriminatorField];
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
     public function getDiscriminatorType($discriminatorValue): string
175 175
     {
176 176
         if (empty($this->discriminatorMap[$discriminatorValue])) {
177
-            throw new \Exception('Unknown discriminator type "' . $discriminatorValue . '"');
177
+            throw new \Exception('Unknown discriminator type "'.$discriminatorValue.'"');
178 178
         }
179 179
 
180 180
         return $this->discriminatorMap[$discriminatorValue];
Please login to merge, or discard this patch.
src/Schema/Util/Name.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
      */
21 21
     public static function generate(string $prefix, array $parts, int $length = self::DEFAULT_LENGTH)
22 22
     {
23
-        $hash = implode('', array_map(function ($part) {
23
+        $hash = implode('', array_map(function($part) {
24 24
             return dechex(crc32($part));
25 25
         }, $parts));
26 26
 
Please login to merge, or discard this patch.
src/Schema/RepositoryUpgrader.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     public function diff(bool $listDrop = true): array
72 72
     {
73 73
         $queries = $this->schema()
74
-            ->simulate(function (SchemaManagerInterface $schema) use ($listDrop) {
74
+            ->simulate(function(SchemaManagerInterface $schema) use ($listDrop) {
75 75
                 $schema->useDrop($listDrop);
76 76
                 $schema->add($this->table());
77 77
             })
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         }
83 83
 
84 84
         $sequenceQueries = $schemaSequence
85
-            ->simulate(function (SchemaManagerInterface $schema) use ($listDrop) {
85
+            ->simulate(function(SchemaManagerInterface $schema) use ($listDrop) {
86 86
                 $schema->useDrop($listDrop);
87 87
                 $schema->add($this->sequence());
88 88
             })
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 
160 160
         /** @var ConnectionInterface&\Doctrine\DBAL\Connection $connection */
161 161
         $connection = $this->connection($this->metadata->sequence['connection']);
162
-        $table  = $this->metadata->sequence['table'];
162
+        $table = $this->metadata->sequence['table'];
163 163
 
164 164
         /** @psalm-suppress UndefinedInterfaceMethod */
165 165
         $nb = $connection->from($table)->count();
Please login to merge, or discard this patch.
src/Schema/Comparator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
      */
31 31
     public function setListDropColumn($flag): void
32 32
     {
33
-        $this->listDropColumn = (bool)$flag;
33
+        $this->listDropColumn = (bool) $flag;
34 34
     }
35 35
     
36 36
     /**
Please login to merge, or discard this patch.
src/Schema/Adapter/Metadata/MetadataIndexSet.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 all(): array
44 44
     {
45
-        $indexes =  $this->extractIndexes($this->metadata->indexes);
45
+        $indexes = $this->extractIndexes($this->metadata->indexes);
46 46
 
47 47
         $primary = $this->primary();
48 48
         $indexes[$primary->name()] = $primary;
Please login to merge, or discard this patch.
src/Migration/MigrationManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
             return $migrations;
113 113
         }
114 114
 
115
-        return array_filter($migrations, function (MigrationInterface $migration) use ($stage) {
115
+        return array_filter($migrations, function(MigrationInterface $migration) use ($stage) {
116 116
             return $migration->stage() === $stage;
117 117
         });
118 118
     }
Please login to merge, or discard this patch.
src/Migration/Provider/FileMigrationProvider.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -88,8 +88,8 @@  discard block
 block discarded – undo
88 88
         }
89 89
 
90 90
         $content = $stage === MigrationInterface::STAGE_DEFAULT
91
-            ? file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'migration.stub')
92
-            : file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'migration-staged.stub')
91
+            ? file_get_contents(__DIR__.DIRECTORY_SEPARATOR.'stubs'.DIRECTORY_SEPARATOR.'migration.stub')
92
+            : file_get_contents(__DIR__.DIRECTORY_SEPARATOR.'stubs'.DIRECTORY_SEPARATOR.'migration-staged.stub')
93 93
         ;
94 94
 
95 95
         // Try to write the migration file
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
     {
149 149
         $this->migrations = [];
150 150
 
151
-        $paths = glob(realpath($this->path) . DIRECTORY_SEPARATOR . '*.php');
151
+        $paths = glob(realpath($this->path).DIRECTORY_SEPARATOR.'*.php');
152 152
 
153 153
         foreach ($paths as $path) {
154 154
             list($version, $className) = $this->parseFilename($path);
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
         }
189 189
 
190 190
         // Check if migration name already exists
191
-        $definedMigration = array_search($className, array_map(function (MigrationInterface $migration) {
191
+        $definedMigration = array_search($className, array_map(function(MigrationInterface $migration) {
192 192
             return $migration->name();
193 193
         }, $this->migrations));
194 194
 
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
      */
234 234
     private function createFilename($version, $className)
235 235
     {
236
-        return $this->path . DIRECTORY_SEPARATOR . $version . '_' . $className . '.php';
236
+        return $this->path.DIRECTORY_SEPARATOR.$version.'_'.$className.'.php';
237 237
     }
238 238
 
239 239
     /**
Please login to merge, or discard this patch.
src/Migration/Version/DbVersionRepository.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
     {
102 102
         $versions = $this->all();
103 103
 
104
-        return (string)end($versions);
104
+        return (string) end($versions);
105 105
     }
106 106
 
107 107
     /**
@@ -188,10 +188,10 @@  discard block
 block discarded – undo
188 188
         $schemaManager = $this->connection->schema();
189 189
 
190 190
         if (!$schemaManager instanceof TableManagerInterface) {
191
-            throw new \LogicException('The connection "' . $this->connection->getName() . '" do not supports table configuration');
191
+            throw new \LogicException('The connection "'.$this->connection->getName().'" do not supports table configuration');
192 192
         }
193 193
 
194
-        $schemaManager->table($this->tableName, function ($table) {
194
+        $schemaManager->table($this->tableName, function($table) {
195 195
             $table->string('version');
196 196
         });
197 197
 
Please login to merge, or discard this patch.