Failed Conditions
Push — develop ( 9800ca...d1cf9a )
by Marco
272:19 queued 264:21
created
lib/Doctrine/ORM/Mapping/Exporter/ManyToManyAssociationMetadataExporter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 
4
-declare(strict_types=1);
4
+declare(strict_types = 1);
5 5
 
6 6
 namespace Doctrine\ORM\Mapping\Exporter;
7 7
 
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
     {
17 17
         /** @var ManyToManyAssociationMetadata $value */
18 18
         $indentation      = str_repeat(self::INDENTATION, $indentationLevel);
19
-        $objectReference  = $indentation . static::VARIABLE;
19
+        $objectReference  = $indentation.static::VARIABLE;
20 20
         $lines            = [];
21 21
 
22 22
         $lines[] = parent::export($value, $indentationLevel);
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
             $lines[] = null;
28 28
             $lines[] = $joinTableExporter->export($value->getJoinTable(), $indentationLevel);
29 29
             $lines[] = null;
30
-            $lines[] = $objectReference . '->setJoinTable(' . $joinTableExporter::VARIABLE . ');';
30
+            $lines[] = $objectReference.'->setJoinTable('.$joinTableExporter::VARIABLE.');';
31 31
         }
32 32
 
33 33
         return implode(PHP_EOL, $lines);
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Exporter/JoinTableMetadataExporter.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 
4
-declare(strict_types=1);
4
+declare(strict_types = 1);
5 5
 
6 6
 namespace Doctrine\ORM\Mapping\Exporter;
7 7
 
@@ -19,19 +19,19 @@  discard block
 block discarded – undo
19 19
         /** @var JoinTableMetadata $value */
20 20
         $joinColumnExporter = new JoinColumnMetadataExporter();
21 21
         $indentation        = str_repeat(self::INDENTATION, $indentationLevel);
22
-        $objectReference    = $indentation . static::VARIABLE;
22
+        $objectReference    = $indentation.static::VARIABLE;
23 23
         $lines              = [];
24 24
 
25 25
         $lines[] = parent::export($value, $indentationLevel);
26 26
 
27 27
         foreach ($value->getJoinColumns() as $joinColumn) {
28 28
             $lines[] = $joinColumnExporter->export($joinColumn, $indentationLevel);
29
-            $lines[] = $objectReference . '->addJoinColumn(' . $joinColumnExporter::VARIABLE . ');';
29
+            $lines[] = $objectReference.'->addJoinColumn('.$joinColumnExporter::VARIABLE.');';
30 30
         }
31 31
 
32 32
         foreach ($value->getInverseJoinColumns() as $inverseJoinColumn) {
33 33
             $lines[] = $joinColumnExporter->export($inverseJoinColumn, $indentationLevel);
34
-            $lines[] = $objectReference . '->addInverseJoinColumn(' . $joinColumnExporter::VARIABLE . ');';
34
+            $lines[] = $objectReference.'->addInverseJoinColumn('.$joinColumnExporter::VARIABLE.');';
35 35
         }
36 36
 
37 37
         return implode(PHP_EOL, $lines);
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Exporter/VariableExporter.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,42 +1,42 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 
4
-declare(strict_types=1);
4
+declare(strict_types = 1);
5 5
 
6 6
 namespace Doctrine\ORM\Mapping\Exporter;
7 7
 
8 8
 class VariableExporter implements Exporter
9 9
 {
10
-    const INDENTATION =  '    ';
10
+    const INDENTATION = '    ';
11 11
 
12 12
     /**
13 13
      * {@inheritdoc}
14 14
      */
15 15
     public function export($value, int $indentationLevel = 0) : string
16 16
     {
17
-        if (! is_array($value)) {
17
+        if ( ! is_array($value)) {
18 18
             return var_export($value, true);
19 19
         }
20 20
 
21 21
         $indentation  = str_repeat(self::INDENTATION, $indentationLevel);
22
-        $longestKey   = array_reduce(array_keys($value), function ($k, $v) {
22
+        $longestKey   = array_reduce(array_keys($value), function($k, $v) {
23 23
             return (string) (strlen((string) $k) > strlen((string) $v) ? $k : $v);
24 24
         });
25 25
         $maxKeyLength = strlen($longestKey) + (is_numeric($longestKey) ? 0 : 2);
26 26
 
27 27
         $lines = [];
28 28
 
29
-        $lines[] = $indentation . '[';
29
+        $lines[] = $indentation.'[';
30 30
 
31 31
         foreach ($value as $entryKey => $entryValue) {
32 32
             $lines[] = sprintf('%s%s => %s,',
33
-                $indentation . self::INDENTATION,
33
+                $indentation.self::INDENTATION,
34 34
                 str_pad(var_export($entryKey, true), $maxKeyLength),
35 35
                 ltrim($this->export($entryValue, $indentationLevel + 1))
36 36
             );
37 37
         }
38 38
 
39
-        $lines[] = $indentation . ']';
39
+        $lines[] = $indentation.']';
40 40
 
41 41
         return implode(PHP_EOL, $lines);
42 42
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Exporter/ColumnMetadataExporter.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 
4
-declare(strict_types=1);
4
+declare(strict_types = 1);
5 5
 
6 6
 namespace Doctrine\ORM\Mapping\Exporter;
7 7
 
@@ -19,20 +19,20 @@  discard block
 block discarded – undo
19 19
         /** @var ColumnMetadata $value */
20 20
         $variableExporter = new VariableExporter();
21 21
         $indentation      = str_repeat(self::INDENTATION, $indentationLevel);
22
-        $objectReference  = $indentation . static::VARIABLE;
22
+        $objectReference  = $indentation.static::VARIABLE;
23 23
         $lines            = [];
24 24
 
25
-        $lines[] = $objectReference . ' = ' . $this->exportInstantiation($value);
25
+        $lines[] = $objectReference.' = '.$this->exportInstantiation($value);
26 26
 
27
-        if (! empty($value->getColumnDefinition())) {
28
-            $lines[] = $objectReference. '->setColumnDefinition("' . $value->getColumnDefinition() . '");';
27
+        if ( ! empty($value->getColumnDefinition())) {
28
+            $lines[] = $objectReference.'->setColumnDefinition("'.$value->getColumnDefinition().'");';
29 29
         }
30 30
 
31
-        $lines[] = $objectReference . '->setTableName("' . $value->getTableName() . '");';
32
-        $lines[] = $objectReference . '->setOptions(' . ltrim($variableExporter->export($value->getOptions(), $indentationLevel + 1)) . ');';
33
-        $lines[] = $objectReference . '->setPrimaryKey(' . ltrim($variableExporter->export($value->isPrimaryKey(), $indentationLevel + 1)) . ');';
34
-        $lines[] = $objectReference . '->setNullable(' . ltrim($variableExporter->export($value->isNullable(), $indentationLevel + 1)) . ');';
35
-        $lines[] = $objectReference . '->setUnique(' . ltrim($variableExporter->export($value->isUnique(), $indentationLevel + 1)) . ');';
31
+        $lines[] = $objectReference.'->setTableName("'.$value->getTableName().'");';
32
+        $lines[] = $objectReference.'->setOptions('.ltrim($variableExporter->export($value->getOptions(), $indentationLevel + 1)).');';
33
+        $lines[] = $objectReference.'->setPrimaryKey('.ltrim($variableExporter->export($value->isPrimaryKey(), $indentationLevel + 1)).');';
34
+        $lines[] = $objectReference.'->setNullable('.ltrim($variableExporter->export($value->isNullable(), $indentationLevel + 1)).');';
35
+        $lines[] = $objectReference.'->setUnique('.ltrim($variableExporter->export($value->isUnique(), $indentationLevel + 1)).');';
36 36
 
37 37
         return implode(PHP_EOL, $lines);
38 38
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Exporter/TableMetadataExporter.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 
4
-declare(strict_types=1);
4
+declare(strict_types = 1);
5 5
 
6 6
 namespace Doctrine\ORM\Mapping\Exporter;
7 7
 
@@ -19,24 +19,24 @@  discard block
 block discarded – undo
19 19
         /** @var TableMetadata $value */
20 20
         $variableExporter = new VariableExporter();
21 21
         $indentation      = str_repeat(self::INDENTATION, $indentationLevel);
22
-        $objectReference  = $indentation . static::VARIABLE;
22
+        $objectReference  = $indentation.static::VARIABLE;
23 23
         $lines = [];
24 24
 
25
-        $lines[] = $objectReference . ' = ' . $this->exportInstantiation($value);
25
+        $lines[] = $objectReference.' = '.$this->exportInstantiation($value);
26 26
 
27
-        if (! empty($value->getSchema())) {
28
-            $lines[] = $objectReference . '->setSchema("' . $value->getSchema() . '");';
27
+        if ( ! empty($value->getSchema())) {
28
+            $lines[] = $objectReference.'->setSchema("'.$value->getSchema().'");';
29 29
         }
30 30
 
31 31
         foreach ($value->getIndexes() as $index) {
32
-            $lines[] = $objectReference . '->addIndex(' . ltrim($variableExporter->export($index, $indentationLevel + 1)) . ');';
32
+            $lines[] = $objectReference.'->addIndex('.ltrim($variableExporter->export($index, $indentationLevel + 1)).');';
33 33
         }
34 34
 
35 35
         foreach ($value->getUniqueConstraints() as $uniqueConstraint) {
36
-            $lines[] = $objectReference . '->addUniqueConstraint(' . ltrim($variableExporter->export($uniqueConstraint, $indentationLevel + 1)) . ');';
36
+            $lines[] = $objectReference.'->addUniqueConstraint('.ltrim($variableExporter->export($uniqueConstraint, $indentationLevel + 1)).');';
37 37
         }
38 38
 
39
-        $lines[] = $objectReference . '->setOptions(' . ltrim($variableExporter->export($value->getOptions(), $indentationLevel + 1)) . ');';
39
+        $lines[] = $objectReference.'->setOptions('.ltrim($variableExporter->export($value->getOptions(), $indentationLevel + 1)).');';
40 40
 
41 41
         return implode(PHP_EOL, $lines);
42 42
     }
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Exporter/TransientMetadataExporter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 
4
-declare(strict_types=1);
4
+declare(strict_types = 1);
5 5
 
6 6
 namespace Doctrine\ORM\Mapping\Exporter;
7 7
 
@@ -18,9 +18,9 @@  discard block
 block discarded – undo
18 18
     {
19 19
         /** @var TransientMetadata $value */
20 20
         $indentation      = str_repeat(self::INDENTATION, $indentationLevel);
21
-        $objectReference  = $indentation . static::VARIABLE;
21
+        $objectReference  = $indentation.static::VARIABLE;
22 22
 
23
-        return $objectReference . ' = ' . $this->exportInstantiation($value);
23
+        return $objectReference.' = '.$this->exportInstantiation($value);
24 24
     }
25 25
 
26 26
     /**
Please login to merge, or discard this patch.
lib/Doctrine/ORM/Mapping/Factory/ClassMetadataResolver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 
4
-declare(strict_types=1);
4
+declare(strict_types = 1);
5 5
 
6 6
 namespace Doctrine\ORM\Mapping\Factory;
7 7
 
Please login to merge, or discard this patch.
ORM/Mapping/Factory/Strategy/FileReaderClassMetadataGeneratorStrategy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 
4
-declare(strict_types=1);
4
+declare(strict_types = 1);
5 5
 
6 6
 namespace Doctrine\ORM\Mapping\Factory\Strategy;
7 7
 
Please login to merge, or discard this patch.
ORM/Mapping/Factory/Strategy/FileWriterClassMetadataGeneratorStrategy.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 
4
-declare(strict_types=1);
4
+declare(strict_types = 1);
5 5
 
6 6
 namespace Doctrine\ORM\Mapping\Factory\Strategy;
7 7
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
         $this->ensureDirectoryIsReady(dirname($filePath));
36 36
 
37
-        $tmpFileName = $filePath . '.' . uniqid('', true);
37
+        $tmpFileName = $filePath.'.'.uniqid('', true);
38 38
 
39 39
         file_put_contents($tmpFileName, $sourceCode);
40 40
         @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) && (false === @mkdir($directory, 0775, true))) {
53
+        if ( ! is_dir($directory) && (false === @mkdir($directory, 0775, true))) {
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.