@@ -50,7 +50,7 @@ |
||
| 50 | 50 | $page = $paramFetcher->get('page'); |
| 51 | 51 | $limit = $paramFetcher->get('limit'); |
| 52 | 52 | /** @var AbstractPagination $paginationView */ |
| 53 | - $paginationView = $this->paginator->paginate($query, $page, $limit); |
|
| 53 | + $paginationView = $this->paginator->paginate($query, $page, $limit); |
|
| 54 | 54 | |
| 55 | 55 | return new RestPaginator( |
| 56 | 56 | $page, |
@@ -148,7 +148,7 @@ |
||
| 148 | 148 | { |
| 149 | 149 | $entityName = $dataclass; |
| 150 | 150 | |
| 151 | - $routeName = 'autocomplete_' . strtolower($entityName); |
|
| 151 | + $routeName = 'autocomplete_'.strtolower($entityName); |
|
| 152 | 152 | |
| 153 | 153 | return $this->router->getRouteCollection()->get($routeName) ? $this->router->generate($routeName) : null; |
| 154 | 154 | } |
@@ -39,9 +39,9 @@ |
||
| 39 | 39 | $current = ''; |
| 40 | 40 | $code = sprintf( |
| 41 | 41 | "%s:\n", |
| 42 | - Container::underscore(substr($bundle, 0, -6)) . ( |
|
| 42 | + Container::underscore(substr($bundle, 0, -6)).( |
|
| 43 | 43 | '/' !== $prefix |
| 44 | - ? '_' . str_replace('/', '_', substr($prefix, 1)) |
|
| 44 | + ? '_'.str_replace('/', '_', substr($prefix, 1)) |
|
| 45 | 45 | : '' |
| 46 | 46 | ) |
| 47 | 47 | ); |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | )); |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | - return $collection->map(function ($entity) { |
|
| 60 | + return $collection->map(function($entity) { |
|
| 61 | 61 | try { |
| 62 | 62 | $entityString = (string) $entity; |
| 63 | 63 | } catch (\Exception $e) { |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | return $collection; |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | - return $collection->map(function ($id) { |
|
| 100 | + return $collection->map(function($id) { |
|
| 101 | 101 | $entity = $this->entityManager |
| 102 | 102 | ->getRepository($this->entityName) |
| 103 | 103 | ->find($id) |
@@ -35,8 +35,8 @@ |
||
| 35 | 35 | if ($resolver instanceof OptionsResolver) { |
| 36 | 36 | $resolver->setAllowedTypes('entityName', ['string']); |
| 37 | 37 | $resolver->setDefined(['entityName']); |
| 38 | - $resolver->setDefault('invalid_message', function (Options $options) { |
|
| 39 | - return 'This value is not valid. Unable to find ' . $options['entityName'] . ' in the database.'; |
|
| 38 | + $resolver->setDefault('invalid_message', function(Options $options) { |
|
| 39 | + return 'This value is not valid. Unable to find '.$options['entityName'].' in the database.'; |
|
| 40 | 40 | }); |
| 41 | 41 | } |
| 42 | 42 | } |
@@ -38,8 +38,8 @@ |
||
| 38 | 38 | if ($resolver instanceof OptionsResolver) { |
| 39 | 39 | $resolver->setAllowedTypes('entityName', ['string']); |
| 40 | 40 | $resolver->setDefined(['entityName']); |
| 41 | - $resolver->setDefault('invalid_message', function (Options $options) { |
|
| 42 | - return 'This value is not valid. Unable to find ' . $options['entityName'] . ' in the database.'; |
|
| 41 | + $resolver->setDefault('invalid_message', function(Options $options) { |
|
| 42 | + return 'This value is not valid. Unable to find '.$options['entityName'].' in the database.'; |
|
| 43 | 43 | }); |
| 44 | 44 | } |
| 45 | 45 | } |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | if (!$this->canWriteToFile($forceOverwrite)) { |
| 34 | 34 | throw new \RuntimeException(sprintf( |
| 35 | 35 | 'Unable to generate the %s manager class as it already exists under the file: %s', |
| 36 | - $this->helper->getEntityClass() . 'Type', |
|
| 36 | + $this->helper->getEntityClass().'Type', |
|
| 37 | 37 | $this->helper->getManagerFullFilename() |
| 38 | 38 | )); |
| 39 | 39 | } |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | $this->renderFile( |
| 52 | 52 | 'manager/interface.php.twig', |
| 53 | - $this->helper->getManagerFullFilename($this->helper->getManagerClass() . 'Interface.php'), |
|
| 53 | + $this->helper->getManagerFullFilename($this->helper->getManagerClass().'Interface.php'), |
|
| 54 | 54 | [ |
| 55 | 55 | 'bundle_namespace' => $this->helper->getBundleNamespace(), |
| 56 | 56 | 'entity_class' => $this->helper->getEntityClass(), |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | */ |
| 42 | 42 | public function generate(ClassMetadataInfo $metadata, $forceOverwrite = false) |
| 43 | 43 | { |
| 44 | - $file = $this->helper->getResourcesDirname() . '/config/serializer/Entity.' . $this->helper->getEntityClass() . '.yml'; |
|
| 44 | + $file = $this->helper->getResourcesDirname().'/config/serializer/Entity.'.$this->helper->getEntityClass().'.yml'; |
|
| 45 | 45 | |
| 46 | 46 | if (!file_exists(dirname($file)) && !@mkdir(dirname($file), 0777, true)) { |
| 47 | 47 | throw new IOException('Unable to create config/serializer directory'); |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | { |
| 94 | 94 | $targetClassName = basename($targetClass); |
| 95 | 95 | |
| 96 | - $targetPath = $dirPath . '/Entity.' . $targetClassName . '.yml'; |
|
| 96 | + $targetPath = $dirPath.'/Entity.'.$targetClassName.'.yml'; |
|
| 97 | 97 | $targetData = $this->getYamlFileContent($targetPath); |
| 98 | 98 | |
| 99 | 99 | if (isset($targetData[$targetClass])) { |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | |
| 179 | 179 | $groups = []; |
| 180 | 180 | foreach ($this->excludedRelationPrefixSuffixPairs as $pair) { |
| 181 | - $groups[] = $pair[0] . $entityName . $pair[1]; |
|
| 181 | + $groups[] = $pair[0].$entityName.$pair[1]; |
|
| 182 | 182 | } |
| 183 | 183 | |
| 184 | 184 | $result[] = [ |
@@ -113,7 +113,7 @@ |
||
| 113 | 113 | */ |
| 114 | 114 | protected function generateTestClass() |
| 115 | 115 | { |
| 116 | - $target = $this->helper->getTestsDirname() . '/Controller/' . $this->helper->getControllerClass() . 'Test.php'; |
|
| 116 | + $target = $this->helper->getTestsDirname().'/Controller/'.$this->helper->getControllerClass().'Test.php'; |
|
| 117 | 117 | |
| 118 | 118 | $this->renderFile('controller/controller-test.php.twig', $target, array( |
| 119 | 119 | 'entity' => $this->entity, |