@@ -8,8 +8,9 @@ |
||
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() |
@@ -4,7 +4,7 @@ discard block |
||
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 |
||
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); |
@@ -1,6 +1,6 @@ |
||
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 |
@@ -10,7 +10,7 @@ |
||
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 | } |