@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | public function testEntitySingleResult() |
| 21 | 21 | { |
| 22 | - $query = $this->_em->createQuery('SELECT d FROM ' . DateTimeModel::class . ' d'); |
|
| 22 | + $query = $this->_em->createQuery('SELECT d FROM '.DateTimeModel::class.' d'); |
|
| 23 | 23 | $datetime = $query->setMaxResults(1)->getSingleResult(); |
| 24 | 24 | |
| 25 | 25 | $this->assertInstanceOf(DateTimeModel::class, $datetime); |
@@ -31,10 +31,10 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | public function testScalarResult() |
| 33 | 33 | { |
| 34 | - $query = $this->_em->createQuery('SELECT d.id, d.time, d.date, d.datetime FROM ' . DateTimeModel::class . ' d ORDER BY d.date ASC'); |
|
| 34 | + $query = $this->_em->createQuery('SELECT d.id, d.time, d.date, d.datetime FROM '.DateTimeModel::class.' d ORDER BY d.date ASC'); |
|
| 35 | 35 | $result = $query->getScalarResult(); |
| 36 | 36 | |
| 37 | - $this->assertCount(2,$result); |
|
| 37 | + $this->assertCount(2, $result); |
|
| 38 | 38 | |
| 39 | 39 | $this->assertContains('11:11:11', $result[0]['time']); |
| 40 | 40 | $this->assertContains('2010-01-01', $result[0]['date']); |
@@ -47,10 +47,10 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | public function testaTicketEntityArrayResult() |
| 49 | 49 | { |
| 50 | - $query = $this->_em->createQuery('SELECT d FROM ' . DateTimeModel::class . ' d ORDER BY d.date ASC'); |
|
| 50 | + $query = $this->_em->createQuery('SELECT d FROM '.DateTimeModel::class.' d ORDER BY d.date ASC'); |
|
| 51 | 51 | $result = $query->getArrayResult(); |
| 52 | 52 | |
| 53 | - $this->assertCount(2,$result); |
|
| 53 | + $this->assertCount(2, $result); |
|
| 54 | 54 | |
| 55 | 55 | $this->assertInstanceOf('DateTime', $result[0]['datetime']); |
| 56 | 56 | $this->assertInstanceOf('DateTime', $result[0]['time']); |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | public function testTicketSingleResult() |
| 65 | 65 | { |
| 66 | - $query = $this->_em->createQuery('SELECT d.id, d.time, d.date, d.datetime FROM ' . DateTimeModel::class . ' d ORDER BY d.date ASC'); |
|
| 66 | + $query = $this->_em->createQuery('SELECT d.id, d.time, d.date, d.datetime FROM '.DateTimeModel::class.' d ORDER BY d.date ASC'); |
|
| 67 | 67 | $datetime = $query->setMaxResults(1)->getSingleResult(); |
| 68 | 68 | |
| 69 | 69 | $this->assertTrue(is_array($datetime)); |
@@ -75,10 +75,10 @@ discard block |
||
| 75 | 75 | |
| 76 | 76 | public function testTicketResult() |
| 77 | 77 | { |
| 78 | - $query = $this->_em->createQuery('SELECT d.id, d.time, d.date, d.datetime FROM ' . DateTimeModel::class . ' d ORDER BY d.date ASC'); |
|
| 78 | + $query = $this->_em->createQuery('SELECT d.id, d.time, d.date, d.datetime FROM '.DateTimeModel::class.' d ORDER BY d.date ASC'); |
|
| 79 | 79 | $result = $query->getResult(); |
| 80 | 80 | |
| 81 | - $this->assertCount(2,$result); |
|
| 81 | + $this->assertCount(2, $result); |
|
| 82 | 82 | |
| 83 | 83 | $this->assertInstanceOf('DateTime', $result[0]['time']); |
| 84 | 84 | $this->assertInstanceOf('DateTime', $result[0]['date']); |
@@ -102,11 +102,11 @@ discard block |
||
| 102 | 102 | |
| 103 | 103 | $dateTime1->date = new \DateTime('2010-01-01', $timezone); |
| 104 | 104 | $dateTime1->time = new \DateTime('2010-01-01 11:11:11', $timezone); |
| 105 | - $dateTime1->datetime= new \DateTime('2010-01-01 11:11:11', $timezone); |
|
| 105 | + $dateTime1->datetime = new \DateTime('2010-01-01 11:11:11', $timezone); |
|
| 106 | 106 | |
| 107 | 107 | $dateTime2->date = new \DateTime('2010-02-02', $timezone); |
| 108 | 108 | $dateTime2->time = new \DateTime('2010-02-02 12:12:12', $timezone); |
| 109 | - $dateTime2->datetime= new \DateTime('2010-02-02 12:12:12', $timezone); |
|
| 109 | + $dateTime2->datetime = new \DateTime('2010-02-02 12:12:12', $timezone); |
|
| 110 | 110 | |
| 111 | 111 | $this->_em->persist($dateTime1); |
| 112 | 112 | $this->_em->persist($dateTime2); |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | $userClone = $this->_em->merge($userClone); |
| 61 | 61 | |
| 62 | 62 | // Back in managed world I would expect to have my phonenumbers back but they aren't! |
| 63 | - // Remember I didn't touch (and probably didn't need) them at all while in detached mode. |
|
| 63 | + // Remember I didn't touch (and probably didn't need) them at all while in detached mode. |
|
| 64 | 64 | $this->assertEquals(4, count($userClone->getPhonenumbers()), 'Phonenumbers are not available anymore'); |
| 65 | 65 | |
| 66 | 66 | // This works fine as long as cmUser::groups doesn't cascade "merge" |
@@ -89,13 +89,13 @@ |
||
| 89 | 89 | $user->username = 'lukacho'; |
| 90 | 90 | $user->status = 'developer'; |
| 91 | 91 | |
| 92 | - foreach([1111,2222,3333,4444] as $number) { |
|
| 92 | + foreach ([1111, 2222, 3333, 4444] as $number) { |
|
| 93 | 93 | $phone = new CmsPhonenumber; |
| 94 | 94 | $phone->phonenumber = $number; |
| 95 | 95 | $user->addPhonenumber($phone); |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | - foreach(['Moshers', 'Headbangers'] as $groupName) { |
|
| 98 | + foreach (['Moshers', 'Headbangers'] as $groupName) { |
|
| 99 | 99 | $group = new CmsGroup; |
| 100 | 100 | $group->setName($groupName); |
| 101 | 101 | $user->addGroup($group); |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | $this |
| 29 | 29 | ->_em |
| 30 | 30 | ->createQuery( |
| 31 | - 'SELECT f, b FROM ' . __NAMESPACE__ . '\DDC3042Foo f JOIN ' . __NAMESPACE__ . '\DDC3042Bar b WITH 1 = 1' |
|
| 31 | + 'SELECT f, b FROM '.__NAMESPACE__.'\DDC3042Foo f JOIN '.__NAMESPACE__.'\DDC3042Bar b WITH 1 = 1' |
|
| 32 | 32 | ) |
| 33 | 33 | ->getSQL() |
| 34 | 34 | ); |
@@ -102,7 +102,7 @@ |
||
| 102 | 102 | /** |
| 103 | 103 | * @Id @Column(name="id", type="integer") |
| 104 | 104 | * @GeneratedValue(strategy="AUTO") |
| 105 | - */ |
|
| 105 | + */ |
|
| 106 | 106 | public $id; |
| 107 | 107 | } |
| 108 | 108 | |
@@ -24,14 +24,14 @@ |
||
| 24 | 24 | $this->_em->getClassMetadata(DDC2660CustomerOrder::class) |
| 25 | 25 | ] |
| 26 | 26 | ); |
| 27 | - } catch(\Exception $e) { |
|
| 27 | + } catch (\Exception $e) { |
|
| 28 | 28 | return; |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | for ($i = 0; $i < 5; $i++) { |
| 32 | 32 | $product = new DDC2660Product(); |
| 33 | 33 | $customer = new DDC2660Customer(); |
| 34 | - $order = new DDC2660CustomerOrder($product, $customer, 'name' . $i); |
|
| 34 | + $order = new DDC2660CustomerOrder($product, $customer, 'name'.$i); |
|
| 35 | 35 | |
| 36 | 36 | $this->_em->persist($product); |
| 37 | 37 | $this->_em->persist($customer); |
@@ -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); |
@@ -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) { |