@@ -35,7 +35,7 @@ |
||
| 35 | 35 | * @Cache |
| 36 | 36 | * @OneToOne(targetEntity="TravelerProfile") |
| 37 | 37 | */ |
| 38 | - protected $profile; |
|
| 38 | + protected $profile; |
|
| 39 | 39 | |
| 40 | 40 | /** |
| 41 | 41 | * @param string $name |
@@ -30,16 +30,16 @@ |
||
| 30 | 30 | */ |
| 31 | 31 | protected $state; |
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * @ManyToMany(targetEntity="Travel", mappedBy="visitedCities") |
|
| 35 | - */ |
|
| 33 | + /** |
|
| 34 | + * @ManyToMany(targetEntity="Travel", mappedBy="visitedCities") |
|
| 35 | + */ |
|
| 36 | 36 | public $travels; |
| 37 | 37 | |
| 38 | - /** |
|
| 39 | - * @Cache |
|
| 40 | - * @OrderBy({"name" = "ASC"}) |
|
| 41 | - * @OneToMany(targetEntity="Attraction", mappedBy="city") |
|
| 42 | - */ |
|
| 38 | + /** |
|
| 39 | + * @Cache |
|
| 40 | + * @OrderBy({"name" = "ASC"}) |
|
| 41 | + * @OneToMany(targetEntity="Attraction", mappedBy="city") |
|
| 42 | + */ |
|
| 43 | 43 | public $attractions; |
| 44 | 44 | |
| 45 | 45 | public function __construct($name, State $state = null) |
@@ -102,6 +102,6 @@ |
||
| 102 | 102 | |
| 103 | 103 | public static function loadMetadata(\Doctrine\ORM\Mapping\ClassMetadataInfo $metadata) |
| 104 | 104 | { |
| 105 | - include __DIR__ . '/../../ORM/Mapping/php/Doctrine.Tests.Models.Cache.City.php'; |
|
| 105 | + include __DIR__.'/../../ORM/Mapping/php/Doctrine.Tests.Models.Cache.City.php'; |
|
| 106 | 106 | } |
| 107 | 107 | } |
@@ -111,11 +111,11 @@ discard block |
||
| 111 | 111 | { |
| 112 | 112 | $metadata->mapField( |
| 113 | 113 | [ |
| 114 | - 'id' => true, |
|
| 115 | - 'fieldName' => 'id', |
|
| 116 | - 'type' => 'integer', |
|
| 117 | - 'columnName' => 'user_id', |
|
| 118 | - 'length' => 150, |
|
| 114 | + 'id' => true, |
|
| 115 | + 'fieldName' => 'id', |
|
| 116 | + 'type' => 'integer', |
|
| 117 | + 'columnName' => 'user_id', |
|
| 118 | + 'length' => 150, |
|
| 119 | 119 | ] |
| 120 | 120 | ); |
| 121 | 121 | $metadata->mapField( |
@@ -131,20 +131,20 @@ discard block |
||
| 131 | 131 | |
| 132 | 132 | $metadata->mapManyToOne( |
| 133 | 133 | [ |
| 134 | - 'fieldName' => 'address', |
|
| 135 | - 'targetEntity' => 'DDC964Address', |
|
| 136 | - 'cascade' => ['persist','merge'], |
|
| 137 | - 'joinColumn' => ['name'=>'address_id', 'referencedColumnMame'=>'id'], |
|
| 134 | + 'fieldName' => 'address', |
|
| 135 | + 'targetEntity' => 'DDC964Address', |
|
| 136 | + 'cascade' => ['persist','merge'], |
|
| 137 | + 'joinColumn' => ['name'=>'address_id', 'referencedColumnMame'=>'id'], |
|
| 138 | 138 | ] |
| 139 | 139 | ); |
| 140 | 140 | |
| 141 | 141 | $metadata->mapManyToMany( |
| 142 | 142 | [ |
| 143 | - 'fieldName' => 'groups', |
|
| 144 | - 'targetEntity' => 'DDC964Group', |
|
| 145 | - 'inversedBy' => 'users', |
|
| 146 | - 'cascade' => ['persist','merge','detach'], |
|
| 147 | - 'joinTable' => [ |
|
| 143 | + 'fieldName' => 'groups', |
|
| 144 | + 'targetEntity' => 'DDC964Group', |
|
| 145 | + 'inversedBy' => 'users', |
|
| 146 | + 'cascade' => ['persist','merge','detach'], |
|
| 147 | + 'joinTable' => [ |
|
| 148 | 148 | 'name' => 'ddc964_users_groups', |
| 149 | 149 | 'joinColumns' => [ |
| 150 | 150 | [ |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | 'referencedColumnName'=>'id', |
| 159 | 159 | ] |
| 160 | 160 | ] |
| 161 | - ] |
|
| 161 | + ] |
|
| 162 | 162 | ] |
| 163 | 163 | ); |
| 164 | 164 | |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | [ |
| 134 | 134 | 'fieldName' => 'address', |
| 135 | 135 | 'targetEntity' => 'DDC964Address', |
| 136 | - 'cascade' => ['persist','merge'], |
|
| 136 | + 'cascade' => ['persist', 'merge'], |
|
| 137 | 137 | 'joinColumn' => ['name'=>'address_id', 'referencedColumnMame'=>'id'], |
| 138 | 138 | ] |
| 139 | 139 | ); |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | 'fieldName' => 'groups', |
| 144 | 144 | 'targetEntity' => 'DDC964Group', |
| 145 | 145 | 'inversedBy' => 'users', |
| 146 | - 'cascade' => ['persist','merge','detach'], |
|
| 146 | + 'cascade' => ['persist', 'merge', 'detach'], |
|
| 147 | 147 | 'joinTable' => [ |
| 148 | 148 | 'name' => 'ddc964_users_groups', |
| 149 | 149 | 'joinColumns' => [ |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | |
| 65 | 65 | public function addProduct(ECommerceProduct $product) |
| 66 | 66 | { |
| 67 | - if (!$this->products->contains($product)) { |
|
| 67 | + if ( ! $this->products->contains($product)) { |
|
| 68 | 68 | $this->products[] = $product; |
| 69 | 69 | $product->addCategory($this); |
| 70 | 70 | } |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | |
| 124 | 124 | public function addCategory(ECommerceCategory $category) |
| 125 | 125 | { |
| 126 | - if (!$this->categories->contains($category)) { |
|
| 126 | + if ( ! $this->categories->contains($category)) { |
|
| 127 | 127 | $this->categories[] = $category; |
| 128 | 128 | $category->addProduct($this); |
| 129 | 129 | } |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | |
| 155 | 155 | public function addRelated(ECommerceProduct $related) |
| 156 | 156 | { |
| 157 | - if (!$this->related->contains($related)) { |
|
| 157 | + if ( ! $this->related->contains($related)) { |
|
| 158 | 158 | $this->related[] = $related; |
| 159 | 159 | $related->addRelated($this); |
| 160 | 160 | } |
@@ -30,16 +30,16 @@ |
||
| 30 | 30 | */ |
| 31 | 31 | private $country; |
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * @ManyToMany(targetEntity="NavUser", cascade={"persist"}) |
|
| 35 | - * @JoinTable(name="navigation_pois_visitors", |
|
| 36 | - * inverseJoinColumns={@JoinColumn(name="user_id", referencedColumnName="id")}, |
|
| 37 | - * joinColumns={ |
|
| 38 | - * @JoinColumn(name="poi_long", referencedColumnName="nav_long"), |
|
| 39 | - * @JoinColumn(name="poi_lat", referencedColumnName="nav_lat") |
|
| 40 | - * } |
|
| 41 | - * ) |
|
| 42 | - */ |
|
| 33 | + /** |
|
| 34 | + * @ManyToMany(targetEntity="NavUser", cascade={"persist"}) |
|
| 35 | + * @JoinTable(name="navigation_pois_visitors", |
|
| 36 | + * inverseJoinColumns={@JoinColumn(name="user_id", referencedColumnName="id")}, |
|
| 37 | + * joinColumns={ |
|
| 38 | + * @JoinColumn(name="poi_long", referencedColumnName="nav_long"), |
|
| 39 | + * @JoinColumn(name="poi_lat", referencedColumnName="nav_lat") |
|
| 40 | + * } |
|
| 41 | + * ) |
|
| 42 | + */ |
|
| 43 | 43 | private $visitors; |
| 44 | 44 | |
| 45 | 45 | public function __construct($lat, $long, $name, $country) |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | * @return int |
| 59 | 59 | */ |
| 60 | 60 | public function getId() { |
| 61 | - return (int)$this->id; |
|
| 61 | + return (int) $this->id; |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | * @param int $width |
| 38 | 38 | */ |
| 39 | 39 | public function setWidth($width) { |
| 40 | - $this->width = (int)$width; |
|
| 40 | + $this->width = (int) $width; |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | /** |
@@ -51,6 +51,6 @@ discard block |
||
| 51 | 51 | * @param int $height |
| 52 | 52 | */ |
| 53 | 53 | public function setHeight($height) { |
| 54 | - $this->height = (int)$height; |
|
| 54 | + $this->height = (int) $height; |
|
| 55 | 55 | } |
| 56 | 56 | } |
| 57 | 57 | \ No newline at end of file |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | { |
| 90 | 90 | $realDbParams = self::getParamsForMainConnection(); |
| 91 | 91 | |
| 92 | - if (! self::$initialized) { |
|
| 92 | + if ( ! self::$initialized) { |
|
| 93 | 93 | $tmpDbParams = self::getParamsForTemporaryConnection(); |
| 94 | 94 | |
| 95 | 95 | $realConn = DriverManager::getConnection($realDbParams); |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | // Connect to tmpdb in order to drop and create the real test db. |
| 98 | 98 | $tmpConn = DriverManager::getConnection($tmpDbParams); |
| 99 | 99 | |
| 100 | - $platform = $tmpConn->getDatabasePlatform(); |
|
| 100 | + $platform = $tmpConn->getDatabasePlatform(); |
|
| 101 | 101 | |
| 102 | 102 | if ($platform->supportsCreateDropDatabase()) { |
| 103 | 103 | $dbname = $realConn->getDatabase(); |