@@ -363,7 +363,7 @@ |
||
363 | 363 | { |
364 | 364 | return $this->addColumn( |
365 | 365 | Column::integer($name, true) |
366 | - ->setAutoIncrement(true) |
|
366 | + ->setAutoIncrement(true) |
|
367 | 367 | ); |
368 | 368 | } |
369 | 369 |
@@ -64,35 +64,35 @@ discard block |
||
64 | 64 | { |
65 | 65 | $errors = []; |
66 | 66 | |
67 | - if ( ! $this->table) { |
|
67 | + if (!$this->table) { |
|
68 | 68 | $errors[] = 'Missing table property'; |
69 | 69 | } |
70 | 70 | |
71 | - if ( ! $this->className) { |
|
71 | + if (!$this->className) { |
|
72 | 72 | $errors[] = 'Missing class name property'; |
73 | 73 | } |
74 | 74 | |
75 | 75 | if ($this->destination) { |
76 | - if ( ! is_dir($this->destination)) { |
|
76 | + if (!is_dir($this->destination)) { |
|
77 | 77 | $errors[] = sprintf('%s is not a valid directory', $this->destination); |
78 | - } elseif ( ! is_writable($this->destination)) { |
|
78 | + } elseif (!is_writable($this->destination)) { |
|
79 | 79 | $errors[] = sprintf('%s is not writable', $this->destination); |
80 | 80 | } |
81 | 81 | } |
82 | 82 | |
83 | - if ( ! $this->entityClass) { |
|
83 | + if (!$this->entityClass) { |
|
84 | 84 | $errors[] = 'Missing entity class name property'; |
85 | 85 | } |
86 | 86 | |
87 | 87 | if ($this->entityDestination) { |
88 | - if ( ! is_dir($this->entityDestination)) { |
|
88 | + if (!is_dir($this->entityDestination)) { |
|
89 | 89 | $errors[] = sprintf('%s is not a valid directory', $this->entityDestination); |
90 | - } elseif ( ! is_writable($this->entityDestination)) { |
|
90 | + } elseif (!is_writable($this->entityDestination)) { |
|
91 | 91 | $errors[] = sprintf('%s is not writable', $this->entityDestination); |
92 | 92 | } |
93 | 93 | } |
94 | 94 | |
95 | - if ( ! is_array($this->columns) || empty($this->columns)) { |
|
95 | + if (!is_array($this->columns) || empty($this->columns)) { |
|
96 | 96 | $errors[] = 'Missing columns definitions'; |
97 | 97 | } |
98 | 98 | |
@@ -418,7 +418,7 @@ discard block |
||
418 | 418 | public function addRelation($name, Relation $relation) |
419 | 419 | { |
420 | 420 | $relation->setMapper($this); |
421 | - if ( ! $relation->getForeignMapper()) { |
|
421 | + if (!$relation->getForeignMapper()) { |
|
422 | 422 | $relation->setForeignMapper(Inflector::pluralize($name)); |
423 | 423 | } |
424 | 424 | $this->relations[$name] = $relation; |
@@ -433,7 +433,7 @@ discard block |
||
433 | 433 | public function addQueryScope($name, QueryScope $queryScope) |
434 | 434 | { |
435 | 435 | $queryScope->setMapper($this); |
436 | - if ( ! $queryScope->getName()) { |
|
436 | + if (!$queryScope->getName()) { |
|
437 | 437 | $queryScope->setName($name); |
438 | 438 | } |
439 | 439 | $this->queryScopes[$name] = $queryScope; |
@@ -460,19 +460,19 @@ discard block |
||
460 | 460 | |
461 | 461 | $singular = Inflector::singularize($name); |
462 | 462 | |
463 | - if ( ! $this->table) { |
|
463 | + if (!$this->table) { |
|
464 | 464 | $this->setTable($name); |
465 | 465 | } |
466 | 466 | |
467 | - if ($this->table !== $name && ! $this->tableAlias) { |
|
467 | + if ($this->table !== $name && !$this->tableAlias) { |
|
468 | 468 | $this->setTableAlias($name); |
469 | 469 | } |
470 | 470 | |
471 | - if ( ! $this->className) { |
|
471 | + if (!$this->className) { |
|
472 | 472 | $this->setClassName(Str::className($singular) . 'Mapper'); |
473 | 473 | } |
474 | 474 | |
475 | - if ( ! $this->entityClass) { |
|
475 | + if (!$this->entityClass) { |
|
476 | 476 | $this->setEntityClass(Str::className($singular)); |
477 | 477 | } |
478 | 478 |