@@ -25,6 +25,6 @@ |
||
25 | 25 | */ |
26 | 26 | public function __construct($path, ConfigurationException $e) |
27 | 27 | { |
28 | - parent::__construct($e->getMessage() . ' (schema : "' . $path . '")', $e->getCode(), $e->getPrevious()); |
|
28 | + parent::__construct($e->getMessage().' (schema : "'.$path.'")', $e->getCode(), $e->getPrevious()); |
|
29 | 29 | } |
30 | 30 | } |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | |
101 | 101 | if (!$schemaTransformer instanceof SchemaTransformerInterface) { |
102 | 102 | throw new \InvalidArgumentException( |
103 | - 'The schema transformer class "' . $transformerClass . '" should implements ' |
|
103 | + 'The schema transformer class "'.$transformerClass.'" should implements ' |
|
104 | 104 | . '\Rocket\ORM\Generator\Schema\Transformer\SchemaTransformerInterface' |
105 | 105 | ); |
106 | 106 | } |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | |
139 | 139 | if (!$schemaRelationTransformer instanceof SchemaRelationTransformerInterface) { |
140 | 140 | throw new \InvalidArgumentException( |
141 | - 'The schema relation transformer class "' . $transformerClass . '" should implements ' |
|
141 | + 'The schema relation transformer class "'.$transformerClass.'" should implements ' |
|
142 | 142 | . '\Rocket\ORM\Generator\Schema\Transformer\SchemaRelationTransformerInterface' |
143 | 143 | ); |
144 | 144 | } |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | ; |
184 | 184 | |
185 | 185 | if (0 === $finder->count()) { |
186 | - throw new SchemaNotFoundException('Schema not found in path "' . $this->path . '"'); |
|
186 | + throw new SchemaNotFoundException('Schema not found in path "'.$this->path.'"'); |
|
187 | 187 | } |
188 | 188 | |
189 | 189 | $schemas = [ |
@@ -269,6 +269,6 @@ |
||
269 | 269 | */ |
270 | 270 | public function getNamespace() |
271 | 271 | { |
272 | - return $this->getSchema()->namespace . '\\' . $this->phpName; |
|
272 | + return $this->getSchema()->namespace.'\\'.$this->phpName; |
|
273 | 273 | } |
274 | 274 | } |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | } |
128 | 128 | |
129 | 129 | throw new \LogicException( |
130 | - 'Unknown value "' . $this->type . '" for constant TableMap::COLUMN_TYPE_* for column "' . $this->name . '"' |
|
130 | + 'Unknown value "'.$this->type.'" for constant TableMap::COLUMN_TYPE_* for column "'.$this->name.'"' |
|
131 | 131 | ); |
132 | 132 | } |
133 | 133 | |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | } |
150 | 150 | } |
151 | 151 | |
152 | - throw new \LogicException('The default value for column "' . $this->name . '" is not found'); |
|
152 | + throw new \LogicException('The default value for column "'.$this->name.'" is not found'); |
|
153 | 153 | } |
154 | 154 | |
155 | 155 | return $this->default; |
@@ -160,14 +160,14 @@ discard block |
||
160 | 160 | */ |
161 | 161 | public function getAttributePhpDoc() |
162 | 162 | { |
163 | - $doc = "/**" . PHP_EOL; |
|
163 | + $doc = "/**".PHP_EOL; |
|
164 | 164 | |
165 | 165 | $startDoc = ' * '; |
166 | 166 | if (null != $this->description) { |
167 | - $doc .= $startDoc . str_replace('*/', '', $this->description) . PHP_EOL . $startDoc . PHP_EOL; |
|
167 | + $doc .= $startDoc.str_replace('*/', '', $this->description).PHP_EOL.$startDoc.PHP_EOL; |
|
168 | 168 | } |
169 | 169 | |
170 | - return $doc . $startDoc . '@var ' . $this->getTypeAsPhpDoc() . PHP_EOL . ' */'; |
|
170 | + return $doc.$startDoc.'@var '.$this->getTypeAsPhpDoc().PHP_EOL.' */'; |
|
171 | 171 | } |
172 | 172 | |
173 | 173 | /** |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | return $this->phpName; |
215 | 215 | } |
216 | 216 | |
217 | - return 'get' . $this->getPhpName(true); |
|
217 | + return 'get'.$this->getPhpName(true); |
|
218 | 218 | } |
219 | 219 | |
220 | 220 | /** |
@@ -38,8 +38,8 @@ discard block |
||
38 | 38 | foreach ($classes as $type => $class) { |
39 | 39 | if (!$this->validateSchemaModelClass($class['class'], $defaultClasses[$type]['class'])) { |
40 | 40 | throw new \InvalidArgumentException( |
41 | - 'The ' . $type . ' model ("' . $class['class'] . '") ' |
|
42 | - . 'model must extend "' . $defaultClasses[$type]['class'] . '"' |
|
41 | + 'The '.$type.' model ("'.$class['class'].'") ' |
|
42 | + . 'model must extend "'.$defaultClasses[$type]['class'].'"' |
|
43 | 43 | ); |
44 | 44 | } |
45 | 45 | |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | |
75 | 75 | // TODO check if the connection name exists |
76 | 76 | |
77 | - $schema->absoluteDirectory = join(DIRECTORY_SEPARATOR, $pathParams) . $schema->relativeDirectory; |
|
77 | + $schema->absoluteDirectory = join(DIRECTORY_SEPARATOR, $pathParams).$schema->relativeDirectory; |
|
78 | 78 | |
79 | 79 | $this->transformTables($schema->getTables()); |
80 | 80 | |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | if (TableMap::COLUMN_TYPE_BOOLEAN == $column->type && null !== $column->getDefault() |
122 | 122 | && true !== $column->getDefault() && false !== $column->getDefault()) { |
123 | 123 | throw new InvalidConfigurationException( |
124 | - 'The default value "' . $column->getDefault(true) . '" for boolean column "' . $column->name . '" on table "' . $column->getTable()->name . '" should be a boolean' |
|
124 | + 'The default value "'.$column->getDefault(true).'" for boolean column "'.$column->name.'" on table "'.$column->getTable()->name.'" should be a boolean' |
|
125 | 125 | ); |
126 | 126 | } |
127 | 127 | |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | if (TableMap::COLUMN_TYPE_ENUM === $column->type && null != $column->getDefault(true) |
130 | 130 | && !in_array($column->getDefault(true), $column->values)) { |
131 | 131 | throw new InvalidConfigurationException( |
132 | - 'Invalid default value "' . $column->getDefault(true) . '" for enum column "' . $column->name . '" on table "' . $column->getTable()->name . '"' |
|
132 | + 'Invalid default value "'.$column->getDefault(true).'" for enum column "'.$column->name.'" on table "'.$column->getTable()->name.'"' |
|
133 | 133 | ); |
134 | 134 | } |
135 | 135 | |
@@ -139,8 +139,8 @@ discard block |
||
139 | 139 | $column->decimal = null; |
140 | 140 | } elseif ($column->decimal >= $column->size) { |
141 | 141 | throw new InvalidConfigurationException( |
142 | - 'Invalid size value "' . $column->size . '" for column "' . $column->name . '" on table "' |
|
143 | - . $column->getTable()->name . '", the size should be greater than the decimal value "' . $column->decimal . '"' |
|
142 | + 'Invalid size value "'.$column->size.'" for column "'.$column->name.'" on table "' |
|
143 | + . $column->getTable()->name.'", the size should be greater than the decimal value "'.$column->decimal.'"' |
|
144 | 144 | ); |
145 | 145 | } |
146 | 146 | } |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | // Add or delete slashes |
168 | 168 | // Add first slash if missing |
169 | 169 | if (0 < strpos($schema->relativeDirectory, DIRECTORY_SEPARATOR)) { |
170 | - $schema->relativeDirectory = DIRECTORY_SEPARATOR . $schema->relativeDirectory; |
|
170 | + $schema->relativeDirectory = DIRECTORY_SEPARATOR.$schema->relativeDirectory; |
|
171 | 171 | } |
172 | 172 | |
173 | 173 | // Delete last slash if exists |
@@ -37,13 +37,13 @@ discard block |
||
37 | 37 | // Check if local column exists |
38 | 38 | $localColumn = $table->getColumn($relation->local); |
39 | 39 | if (null == $localColumn) { |
40 | - throw new InvalidConfigurationException('Invalid local column value "' . $relation->local . '" for relation "' . $relation->with . '"'); |
|
40 | + throw new InvalidConfigurationException('Invalid local column value "'.$relation->local.'" for relation "'.$relation->with.'"'); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | // Find the related relation in loaded schemas |
44 | 44 | $relatedTable = $this->guessRelatedTable($relation->with, $schemas); |
45 | 45 | $oldWith = $relation->with; |
46 | - $relation->with = $relatedTable->getSchema()->escapedNamespace . '\\\\' . $relatedTable->phpName; |
|
46 | + $relation->with = $relatedTable->getSchema()->escapedNamespace.'\\\\'.$relatedTable->phpName; |
|
47 | 47 | |
48 | 48 | if (null == $relation->phpName) { |
49 | 49 | $relation->phpName = $relatedTable->phpName; |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | // Check if foreign column exists |
53 | 53 | $foreignColumn = $relatedTable->getColumn($relation->foreign); |
54 | 54 | if (null == $foreignColumn) { |
55 | - throw new InvalidConfigurationException('Invalid foreign column value "' . $relation->foreign . '" for relation "' . $oldWith . '"'); |
|
55 | + throw new InvalidConfigurationException('Invalid foreign column value "'.$relation->foreign.'" for relation "'.$oldWith.'"'); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | // TODO check if the local column type == foreign column type |
@@ -102,11 +102,11 @@ discard block |
||
102 | 102 | } |
103 | 103 | |
104 | 104 | if (!isset($tables[0])) { |
105 | - throw new InvalidConfigurationException('Invalid relation "' . $with . '"'); |
|
105 | + throw new InvalidConfigurationException('Invalid relation "'.$with.'"'); |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | if (1 < sizeof($tables)) { |
109 | - throw new InvalidConfigurationException('Too much table for the relation "' . $with . '", prefix it with the database or use the object namespace'); |
|
109 | + throw new InvalidConfigurationException('Too much table for the relation "'.$with.'", prefix it with the database or use the object namespace'); |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | return $tables[0]; |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | $relatedType = TableMap::RELATION_TYPE_ONE_TO_ONE; |
152 | 152 | } |
153 | 153 | |
154 | - $relatedRelation = new Relation($table->getSchema()->escapedNamespace . '\\\\' . $table->phpName, [ |
|
154 | + $relatedRelation = new Relation($table->getSchema()->escapedNamespace.'\\\\'.$table->phpName, [ |
|
155 | 155 | 'local' => $relation->foreign, |
156 | 156 | 'foreign' => $relation->local, |
157 | 157 | 'type' => $relatedType, |
@@ -132,8 +132,8 @@ discard block |
||
132 | 132 | } |
133 | 133 | |
134 | 134 | throw new \LogicException( |
135 | - 'Unknown value "' . $this->type . '" for constant TableMap::RELATION_TYPE_* ' |
|
136 | - . 'for relation "' . $this->phpName . '"' |
|
135 | + 'Unknown value "'.$this->type.'" for constant TableMap::RELATION_TYPE_* ' |
|
136 | + . 'for relation "'.$this->phpName.'"' |
|
137 | 137 | ); |
138 | 138 | } |
139 | 139 | |
@@ -202,8 +202,8 @@ discard block |
||
202 | 202 | } |
203 | 203 | |
204 | 204 | throw new \LogicException( |
205 | - 'Cannot retrieve the related relation for between "' . $this->localTable->name . '" and "' |
|
206 | - . $this->relatedTable->name . '" (relation name : "' . $this->phpName . '")' |
|
205 | + 'Cannot retrieve the related relation for between "'.$this->localTable->name.'" and "' |
|
206 | + . $this->relatedTable->name.'" (relation name : "'.$this->phpName.'")' |
|
207 | 207 | ); |
208 | 208 | } |
209 | 209 | } |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | ->cannotBeEmpty() |
121 | 121 | ->beforeNormalization() |
122 | 122 | ->ifString() |
123 | - ->then(function ($value) { |
|
123 | + ->then(function($value) { |
|
124 | 124 | return TableMap::convertColumnTypeToConstant($value); // @codeCoverageIgnore |
125 | 125 | }) |
126 | 126 | ->end() |
@@ -194,14 +194,14 @@ discard block |
||
194 | 194 | ->defaultValue('RESTRICT') |
195 | 195 | ->validate() |
196 | 196 | ->ifNotInArray($onActionBehaviors) |
197 | - ->thenInvalid('Invalid "onUpdate" behavior for value "%s", available : ' . join(', ', $onActionBehaviors)) |
|
197 | + ->thenInvalid('Invalid "onUpdate" behavior for value "%s", available : '.join(', ', $onActionBehaviors)) |
|
198 | 198 | ->end() |
199 | 199 | ->end() |
200 | 200 | ->scalarNode('onDelete') |
201 | 201 | ->defaultValue('RESTRICT') |
202 | 202 | ->validate() |
203 | 203 | ->ifNotInArray($onActionBehaviors) |
204 | - ->thenInvalid('Invalid "onDelete" behavior for value "%s", available : ' . join(', ', $onActionBehaviors)) |
|
204 | + ->thenInvalid('Invalid "onDelete" behavior for value "%s", available : '.join(', ', $onActionBehaviors)) |
|
205 | 205 | ->end() |
206 | 206 | ->end() |
207 | 207 | ->end() |