@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | { |
| 18 | 18 | parent::setUp(); |
| 19 | 19 | |
| 20 | - $testDir = sys_get_temp_dir() . '/DDC742Test' . uniqid(); |
|
| 20 | + $testDir = sys_get_temp_dir().'/DDC742Test'.uniqid(); |
|
| 21 | 21 | |
| 22 | 22 | mkdir($testDir); |
| 23 | 23 | |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | $this->_em->getClassMetadata(DDC742Comment::class) |
| 32 | 32 | ] |
| 33 | 33 | ); |
| 34 | - } catch(\Exception $e) { |
|
| 34 | + } catch (\Exception $e) { |
|
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | // make sure classes will be deserialized from caches |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | $this->_em->clear(); |
| 45 | 45 | |
| 46 | 46 | $r = $this->_em->createQuery('select ca,c from ' . DDC522Cart::class . ' ca join ca.customer c') |
| 47 | - ->getResult(); |
|
| 47 | + ->getResult(); |
|
| 48 | 48 | |
| 49 | 49 | $this->assertInstanceOf(DDC522Cart::class, $r[0]); |
| 50 | 50 | $this->assertInstanceOf(DDC522Customer::class, $r[0]->customer); |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | $this->_em->getClassMetadata(DDC522ForeignKeyTest::class) |
| 23 | 23 | ] |
| 24 | 24 | ); |
| 25 | - } catch(\Exception $e) { |
|
| 25 | + } catch (\Exception $e) { |
|
| 26 | 26 | } |
| 27 | 27 | } |
| 28 | 28 | |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | $this->_em->clear(); |
| 45 | 45 | |
| 46 | - $r = $this->_em->createQuery('select ca,c from ' . DDC522Cart::class . ' ca join ca.customer c') |
|
| 46 | + $r = $this->_em->createQuery('select ca,c from '.DDC522Cart::class.' ca join ca.customer c') |
|
| 47 | 47 | ->getResult(); |
| 48 | 48 | |
| 49 | 49 | $this->assertInstanceOf(DDC522Cart::class, $r[0]); |
@@ -47,19 +47,19 @@ |
||
| 47 | 47 | $this->_em->clear(); |
| 48 | 48 | |
| 49 | 49 | $result = $this->_em->createQueryBuilder() |
| 50 | - ->select('p') |
|
| 51 | - ->from(DDC3170ProductJoined::class, 'p') |
|
| 52 | - ->getQuery() |
|
| 53 | - ->getResult(AbstractQuery::HYDRATE_SIMPLEOBJECT); |
|
| 50 | + ->select('p') |
|
| 51 | + ->from(DDC3170ProductJoined::class, 'p') |
|
| 52 | + ->getQuery() |
|
| 53 | + ->getResult(AbstractQuery::HYDRATE_SIMPLEOBJECT); |
|
| 54 | 54 | |
| 55 | 55 | self::assertCount(1, $result); |
| 56 | 56 | self::assertContainsOnly(DDC3170ProductJoined::class, $result); |
| 57 | 57 | |
| 58 | 58 | $result = $this->_em->createQueryBuilder() |
| 59 | - ->select('p') |
|
| 60 | - ->from(DDC3170ProductSingleTable::class, 'p') |
|
| 61 | - ->getQuery() |
|
| 62 | - ->getResult(AbstractQuery::HYDRATE_SIMPLEOBJECT); |
|
| 59 | + ->select('p') |
|
| 60 | + ->from(DDC3170ProductSingleTable::class, 'p') |
|
| 61 | + ->getQuery() |
|
| 62 | + ->getResult(AbstractQuery::HYDRATE_SIMPLEOBJECT); |
|
| 63 | 63 | |
| 64 | 64 | self::assertCount(1, $result); |
| 65 | 65 | self::assertContainsOnly(DDC3170ProductSingleTable::class, $result); |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | $this->_em->getClassMetadata(DDC832Like::class), |
| 25 | 25 | ] |
| 26 | 26 | ); |
| 27 | - } catch(\Exception $e) { |
|
| 27 | + } catch (\Exception $e) { |
|
| 28 | 28 | } |
| 29 | 29 | } |
| 30 | 30 | |
@@ -115,7 +115,7 @@ |
||
| 115 | 115 | return $this->number; |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | - public function setClient(DDC440Client $value, $update_inverse=true) |
|
| 118 | + public function setClient(DDC440Client $value, $update_inverse = true) |
|
| 119 | 119 | { |
| 120 | 120 | $this->client = $value; |
| 121 | 121 | if ($update_inverse) { |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | $relation = new DDC3699RelationOne(); |
| 33 | 33 | |
| 34 | 34 | $relation->id = $id; |
| 35 | - $relation->child = $child ; |
|
| 35 | + $relation->child = $child; |
|
| 36 | 36 | $child->oneRelation = $relation; |
| 37 | 37 | |
| 38 | 38 | $this->_em->persist($relation); |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | $relation = new DDC3699RelationMany(); |
| 76 | 76 | |
| 77 | 77 | $relation->id = $id; |
| 78 | - $relation->child = $child ; |
|
| 78 | + $relation->child = $child; |
|
| 79 | 79 | $child->relations[] = $relation; |
| 80 | 80 | |
| 81 | 81 | $this->_em->persist($relation); |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | $this->_em->getClassMetadata(DDC1228Profile::class), |
| 19 | 19 | ] |
| 20 | 20 | ); |
| 21 | - } catch(\Exception $e) { |
|
| 21 | + } catch (\Exception $e) { |
|
| 22 | 22 | |
| 23 | 23 | } |
| 24 | 24 | } |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | public function testIndexByJoin() |
| 72 | 72 | { |
| 73 | 73 | $dql = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A '. |
| 74 | - 'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC'; |
|
| 74 | + 'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC'; |
|
| 75 | 75 | $result = $this->_em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT); |
| 76 | 76 | |
| 77 | 77 | $this->assertEquals(3, count($result[0]->books)); // Alice, Joe doesn't appear because he has no books. |
@@ -95,14 +95,14 @@ discard block |
||
| 95 | 95 | public function testIndexByToOneJoinSilentlyIgnored() |
| 96 | 96 | { |
| 97 | 97 | $dql = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B '. |
| 98 | - 'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC'; |
|
| 98 | + 'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC'; |
|
| 99 | 99 | $result = $this->_em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT); |
| 100 | 100 | |
| 101 | 101 | $this->assertInstanceOf(DDC618Book::class, $result[0]); |
| 102 | 102 | $this->assertInstanceOf(DDC618Author::class, $result[0]->author); |
| 103 | 103 | |
| 104 | 104 | $dql = 'SELECT B, A FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Book B '. |
| 105 | - 'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC'; |
|
| 105 | + 'INNER JOIN B.author A INDEX BY A.name ORDER BY A.name ASC'; |
|
| 106 | 106 | $result = $this->_em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_ARRAY); |
| 107 | 107 | |
| 108 | 108 | $this->assertEquals("Alice", $result[0]['author']['name']); |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | public function testCombineIndexBy() |
| 115 | 115 | { |
| 116 | 116 | $dql = 'SELECT A, B FROM Doctrine\Tests\ORM\Functional\Ticket\DDC618Author A INDEX BY A.id '. |
| 117 | - 'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC'; |
|
| 117 | + 'INNER JOIN A.books B INDEX BY B.title ORDER BY A.name ASC'; |
|
| 118 | 118 | $result = $this->_em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_OBJECT); |
| 119 | 119 | |
| 120 | 120 | $this->assertArrayHasKey(11, $result); // Alice |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | $this->_em->flush(); |
| 38 | 38 | $this->_em->clear(); |
| 39 | - } catch(\Exception $e) { |
|
| 39 | + } catch (\Exception $e) { |
|
| 40 | 40 | |
| 41 | 41 | } |
| 42 | 42 | } |
@@ -76,17 +76,17 @@ discard block |
||
| 76 | 76 | |
| 77 | 77 | $this->assertEquals(3, count($result[0]->books)); // Alice, Joe doesn't appear because he has no books. |
| 78 | 78 | $this->assertEquals('Alice', $result[0]->name); |
| 79 | - $this->assertTrue( isset($result[0]->books["In Wonderland"] ), "Indexing by title should have books by title."); |
|
| 80 | - $this->assertTrue( isset($result[0]->books["Reloaded"] ), "Indexing by title should have books by title."); |
|
| 81 | - $this->assertTrue( isset($result[0]->books["Test"] ), "Indexing by title should have books by title."); |
|
| 79 | + $this->assertTrue(isset($result[0]->books["In Wonderland"]), "Indexing by title should have books by title."); |
|
| 80 | + $this->assertTrue(isset($result[0]->books["Reloaded"]), "Indexing by title should have books by title."); |
|
| 81 | + $this->assertTrue(isset($result[0]->books["Test"]), "Indexing by title should have books by title."); |
|
| 82 | 82 | |
| 83 | 83 | $result = $this->_em->createQuery($dql)->getResult(\Doctrine\ORM\Query::HYDRATE_ARRAY); |
| 84 | 84 | |
| 85 | 85 | $this->assertEquals(3, count($result[0]['books'])); // Alice, Joe doesn't appear because he has no books. |
| 86 | 86 | $this->assertEquals('Alice', $result[0]['name']); |
| 87 | - $this->assertTrue( isset($result[0]['books']["In Wonderland"] ), "Indexing by title should have books by title."); |
|
| 88 | - $this->assertTrue( isset($result[0]['books']["Reloaded"] ), "Indexing by title should have books by title."); |
|
| 89 | - $this->assertTrue( isset($result[0]['books']["Test"] ), "Indexing by title should have books by title."); |
|
| 87 | + $this->assertTrue(isset($result[0]['books']["In Wonderland"]), "Indexing by title should have books by title."); |
|
| 88 | + $this->assertTrue(isset($result[0]['books']["Reloaded"]), "Indexing by title should have books by title."); |
|
| 89 | + $this->assertTrue(isset($result[0]['books']["Test"]), "Indexing by title should have books by title."); |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | /** |
@@ -121,9 +121,9 @@ discard block |
||
| 121 | 121 | |
| 122 | 122 | $this->assertEquals(3, count($result[11]->books)); // Alice, Joe doesn't appear because he has no books. |
| 123 | 123 | $this->assertEquals('Alice', $result[11]->name); |
| 124 | - $this->assertTrue( isset($result[11]->books["In Wonderland"] ), "Indexing by title should have books by title."); |
|
| 125 | - $this->assertTrue( isset($result[11]->books["Reloaded"] ), "Indexing by title should have books by title."); |
|
| 126 | - $this->assertTrue( isset($result[11]->books["Test"] ), "Indexing by title should have books by title."); |
|
| 124 | + $this->assertTrue(isset($result[11]->books["In Wonderland"]), "Indexing by title should have books by title."); |
|
| 125 | + $this->assertTrue(isset($result[11]->books["Reloaded"]), "Indexing by title should have books by title."); |
|
| 126 | + $this->assertTrue(isset($result[11]->books["Test"]), "Indexing by title should have books by title."); |
|
| 127 | 127 | } |
| 128 | 128 | } |
| 129 | 129 | |
@@ -32,8 +32,8 @@ |
||
| 32 | 32 | public function testIsListenerCalledOnlyOnceOnPreFlush() |
| 33 | 33 | { |
| 34 | 34 | $listener = $this->getMockBuilder(DDC2692Listener::class) |
| 35 | - ->setMethods(['preFlush']) |
|
| 36 | - ->getMock(); |
|
| 35 | + ->setMethods(['preFlush']) |
|
| 36 | + ->getMock(); |
|
| 37 | 37 | |
| 38 | 38 | $listener->expects($this->once())->method('preFlush'); |
| 39 | 39 | |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | $this->_em->getClassMetadata(DDC2692Foo::class), |
| 24 | 24 | ] |
| 25 | 25 | ); |
| 26 | - } catch(\Exception $e) { |
|
| 26 | + } catch (\Exception $e) { |
|
| 27 | 27 | return; |
| 28 | 28 | } |
| 29 | 29 | $this->_em->clear(); |