Passed
Branch develop (89fb68)
by Pavel
03:53
created
Category
tests/app/AppKernel.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,11 +34,11 @@
 block discarded – undo
34 34
 
35 35
     public function registerContainerConfiguration(LoaderInterface $loader)
36 36
     {
37
-        $loader->load(__DIR__ . '/config/config_' . $this->getEnvironment() . '.yml');
37
+        $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
38 38
     }
39 39
 
40 40
     public function getCacheDir()
41 41
     {
42
-        return __DIR__ . '/cache/' . $this->environment;
42
+        return __DIR__.'/cache/'.$this->environment;
43 43
     }
44 44
 }
Please login to merge, or discard this patch.
tests/Maker/FunctionalTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
         $input = new StringInput("make:form-layer $name $entity");
48 48
         $output = new BufferedOutput(OutputInterface::VERBOSITY_NORMAL, true);
49 49
         $this->application->run($input, $output);
50
-        $filePath = $this->app_path . "/FormLayer/$name.php";
50
+        $filePath = $this->app_path."/FormLayer/$name.php";
51 51
         $this->assertTrue(is_file($filePath));
52 52
         $layerClass = "Pfilsx\\FormLayer\\Tests\\app\\FormLayer\\$name";
53 53
         $layer = new $layerClass();
Please login to merge, or discard this patch.
tests/Layer/EntityFormLayerTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
          * @var Node|Model $node
62 62
          */
63 63
         $node = new $entityClass();
64
-        if ($useMethod){
64
+        if ($useMethod) {
65 65
             $node->setCreatedAt(new DateTime('01.01.1970'))
66 66
                 ->setId(1)->setContent('Test content');
67 67
         } else {
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
         $this->assertNotSame($node, $layer->create(true));
103 103
     }
104 104
 
105
-    public function getLayers(){
105
+    public function getLayers() {
106 106
         yield [
107 107
             NodeFormLayer::class,
108 108
             Node::class,
Please login to merge, or discard this patch.
src/DependencyInjection/FormLayerExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 {
13 13
     public function load(array $configs, ContainerBuilder $container)
14 14
     {
15
-        $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
15
+        $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
16 16
         $loader->load('services.xml');
17 17
     }
18 18
 }
Please login to merge, or discard this patch.
src/Maker/MakeFormLayer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
             $argument = $command->getDefinition()->getArgument('bound-class');
68 68
             $entities = $this->entityHelper->getEntitiesForAutocomplete();
69 69
             $question = new Question($argument->getDescription());
70
-            $question->setValidator(function ($answer) use ($entities) {return Validator::existsOrNull($answer, $entities); });
70
+            $question->setValidator(function($answer) use ($entities) {return Validator::existsOrNull($answer, $entities); });
71 71
             $question->setAutocompleterValues($entities);
72 72
             $question->setMaxAttempts(3);
73 73
             $input->setArgument('bound-class', $io->askQuestion($question));
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
             );
95 95
             $doctrineMetadata = $this->entityHelper->getMetadata($boundClassDetails->getFullName());
96 96
             if ($doctrineMetadata instanceof ClassMetadata) {
97
-                foreach ($doctrineMetadata->getFieldNames() as $fieldName){
97
+                foreach ($doctrineMetadata->getFieldNames() as $fieldName) {
98 98
                     $formFields[] = $fieldName;
99 99
                 }
100 100
                 foreach ($doctrineMetadata->associationMappings as $fieldName => $relation) {
Please login to merge, or discard this patch.
src/Layer/EntityFormLayer.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     public function load($entity)
39 39
     {
40 40
         if (!is_a($entity, static::getEntityClass())) {
41
-            throw new InvalidArgumentException('Expected instance of ' . static::getEntityClass() . ', got ' . get_class($entity));
41
+            throw new InvalidArgumentException('Expected instance of '.static::getEntityClass().', got '.get_class($entity));
42 42
         }
43 43
         $this->entity = $entity;
44 44
         $this->loadLayerFields();
@@ -72,14 +72,14 @@  discard block
 block discarded – undo
72 72
     protected function loadLayerFields()
73 73
     {
74 74
         foreach (get_object_vars($this) as $prop => $val) {
75
-            $getter = 'get' . $prop;
75
+            $getter = 'get'.$prop;
76 76
             $value = $val;
77 77
             if (method_exists($this->entity, $getter)) {
78 78
                 $value = $this->entity->$getter();
79 79
             } elseif (property_exists($this->entity, $prop)) {
80 80
                 $value = $this->entity->$prop;
81 81
             }
82
-            $loadMethod = 'load' . $prop;
82
+            $loadMethod = 'load'.$prop;
83 83
             if (method_exists($this, $loadMethod)) {
84 84
                 $this->$loadMethod($value);
85 85
             } else {
@@ -93,9 +93,9 @@  discard block
 block discarded – undo
93 93
     protected function loadEntityFields()
94 94
     {
95 95
         foreach (get_object_vars($this) as $prop => $value) {
96
-            $saveMethod = 'save' . $prop;
96
+            $saveMethod = 'save'.$prop;
97 97
             $value = method_exists($this, $saveMethod) ? $this->$saveMethod() : $this->$prop;
98
-            $setter = 'set' . $prop;
98
+            $setter = 'set'.$prop;
99 99
             if (method_exists($this->entity, $setter)) {
100 100
                 $this->entity->$setter($value);
101 101
             } elseif (property_exists($this->entity, $prop)) {
Please login to merge, or discard this patch.