Skip to content

Commit 269dd6a

Browse files
committed
Upgrading for better code analysis
1 parent 29794c8 commit 269dd6a

File tree

8 files changed

+13
-14
lines changed

8 files changed

+13
-14
lines changed

Form/DataTransformer/MiddleClassTransformer.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function __construct($propertyClass, $middleClass)
4040
*/
4141
public function transform($collection)
4242
{
43-
if($collection != null){
43+
if($collection !== null){
4444
$result = new ArrayCollection();
4545

4646
$propertyRef = new \ReflectionClass($this->propertyClass);
@@ -72,7 +72,6 @@ public function reverseTransform($collection)
7272
$propertyRef = new \ReflectionClass($this->propertyClass);
7373
$middleRef = new \ReflectionClass($this->middleClass);
7474
$setMethod = 'set' . $propertyRef->getShortName();
75-
$getId = 'getId';
7675
if ($middleRef->hasMethod($setMethod)) {
7776
foreach($collection as $item){
7877
$middle = $middleRef->newInstance();
@@ -82,4 +81,4 @@ public function reverseTransform($collection)
8281
}
8382
return $result;
8483
}
85-
}
84+
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace abdielcs\ExpandedCollectionBundle\Form;
12+
namespace abdielcs\ExpandedCollectionBundle\Form\Type;
1313

1414
use abdielcs\ExpandedCollectionBundle\Form\DataTransformer\MiddleClassTransformer;
1515
use Symfony\Component\Form\AbstractType;
@@ -57,4 +57,4 @@ public function setDefaultOptions(OptionsResolverInterface $resolver)
5757
));
5858
}
5959

60-
}
60+
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace abdielcs\ExpandedCollectionBundle\Form;
12+
namespace abdielcs\ExpandedCollectionBundle\Form\Type;
1313

1414
use Symfony\Component\Form\AbstractType;
1515
use Symfony\Component\Form\FormInterface;
@@ -73,4 +73,4 @@ public function finishView(FormView $view, FormInterface $form, array $options)
7373
}
7474
}
7575

76-
}
76+
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ That's it!. Now you can start to use it.
5454
License
5555
-------
5656

57-
This software is published under the [MIT License](LICENSE.md)
57+
This software is published under the [MIT License](LICENSE.md)

Resources/config/services.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
parameters:
2-
expanded_otm.form: abdielcs\ExpandedCollectionBundle\Form\ExpandedOTMType
3-
expanded_mtm.form: abdielcs\ExpandedCollectionBundle\Form\ExpandedMTMType
2+
expanded_otm.form: abdielcs\ExpandedCollectionBundle\Form\Type\ExpandedOTMType
3+
expanded_mtm.form: abdielcs\ExpandedCollectionBundle\Form\Type\ExpandedMTMType
44

55
services:
66
expanded_otm.service:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{{ value|nl2br }}
1+
{{ value|nl2br }}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{{ (translation_domain is same as(false) ? field_label : field_label|trans({}, translation_domain)) | humanize }}
1+
{{ (translation_domain is same as(false) ? field_label : field_label|trans({}, translation_domain)) | humanize }}

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"MIT"
1414
],
1515
"require" : {
16-
"symfony/symfony": ">=2.3"
16+
"symfony/symfony": "~2.3|~3.0"
1717
},
1818
"autoload" : {
1919
"psr-4" : {
@@ -25,4 +25,4 @@
2525
"dev-master" : "0.1.x-dev"
2626
}
2727
}
28-
}
28+
}

0 commit comments

Comments
 (0)