Completed
Push — master ( d5010b...98c559 )
by Adam
01:52
created
Services/ViewModelService.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,9 @@
 block discarded – undo
8 8
 {
9 9
     public function __construct($irregularPlurals = array())
10 10
     {
11
-        foreach ($irregularPlurals as $singular => $plural)
12
-            ViewModelNode::addPlural($singular, $plural);
11
+        foreach ($irregularPlurals as $singular => $plural) {
12
+                    ViewModelNode::addPlural($singular, $plural);
13
+        }
13 14
     }
14 15
 
15 16
     public function createViewModel()
Please login to merge, or discard this patch.
ViewModel/ViewModelNode.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 
5 5
 class ViewModelNode implements \ArrayAccess
6 6
 {
7
-    static private $plurals =array();
7
+    static private $plurals = array();
8 8
 
9 9
     public static function addPlural($singular, $plural)
10 10
     {
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
             case 'add':
90 90
                 $arg = $args[0];
91
-                $entityName = isset(self::$plurals[$target]) ? self::$plurals[$target] : $target . 's';
91
+                $entityName = isset(self::$plurals[$target]) ? self::$plurals[$target] : $target.'s';
92 92
 
93 93
                 if (isset($this->$entityName) && $this->$entityName instanceof ViewModelNode) {
94 94
                     return $this->{$entityName}->add($arg);
Please login to merge, or discard this patch.
Tests/bootstrap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!is_file($autoloaderFile = __DIR__ . '/../vendor/autoload.php') && !is_file($autoloaderFile = __DIR__ . '/../../../../../../vendor/autoload.php')) {
3
+if (!is_file($autoloaderFile = __DIR__.'/../vendor/autoload.php') && !is_file($autoloaderFile = __DIR__.'/../../../../../../vendor/autoload.php')) {
4 4
     throw new \LogicException('Could not find autoload.php in vendor/. Did you run "composer install"?');
5 5
 }
6 6
 
Please login to merge, or discard this patch.
Tests/DependencyInjection/gotakkViewModelExtensionYamlTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 {
11 11
     protected function loadConfiguration(ContainerBuilder $container, $resource)
12 12
     {
13
-        $loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/Fixtures/Yaml/'));
14
-        $loader->load($resource . '.yml');
13
+        $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/Fixtures/Yaml/'));
14
+        $loader->load($resource.'.yml');
15 15
     }
16 16
 }
Please login to merge, or discard this patch.