Failed Conditions
Push — master ( 6744b4...2b8acb )
by Marco
60:45 queued 60:36
created
lib/Doctrine/ORM/ORMInvalidArgumentException.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      */
35 35
     static public function scheduleInsertForManagedEntity($entity)
36 36
     {
37
-        return new self("A managed+dirty entity " . self::objToStr($entity) . " can not be scheduled for insertion.");
37
+        return new self("A managed+dirty entity ".self::objToStr($entity)." can not be scheduled for insertion.");
38 38
     }
39 39
 
40 40
     /**
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      */
45 45
     static public function scheduleInsertForRemovedEntity($entity)
46 46
     {
47
-        return new self("Removed entity " . self::objToStr($entity) . " can not be scheduled for insertion.");
47
+        return new self("Removed entity ".self::objToStr($entity)." can not be scheduled for insertion.");
48 48
     }
49 49
 
50 50
     /**
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      */
55 55
     static public function scheduleInsertTwice($entity)
56 56
     {
57
-        return new self("Entity " . self::objToStr($entity) . " can not be scheduled for insertion twice.");
57
+        return new self("Entity ".self::objToStr($entity)." can not be scheduled for insertion twice.");
58 58
     }
59 59
 
60 60
     /**
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     static public function entityWithoutIdentity($className, $entity)
67 67
     {
68 68
         return new self(
69
-            "The given entity of type '" . $className . "' (".self::objToStr($entity).") has no identity/no " .
69
+            "The given entity of type '".$className."' (".self::objToStr($entity).") has no identity/no ".
70 70
             "id values set. It cannot be added to the identity map."
71 71
         );
72 72
     }
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      */
79 79
     static public function readOnlyRequiresManagedEntity($entity)
80 80
     {
81
-        return new self("Only managed entities can be marked or checked as read only. But " . self::objToStr($entity) . " is not");
81
+        return new self("Only managed entities can be marked or checked as read only. But ".self::objToStr($entity)." is not");
82 82
     }
83 83
 
84 84
     /**
@@ -90,13 +90,13 @@  discard block
 block discarded – undo
90 90
     static public function newEntityFoundThroughRelationship(array $assoc, $entry)
91 91
     {
92 92
         return new self("A new entity was found through the relationship '"
93
-            . $assoc['sourceEntity'] . "#" . $assoc['fieldName'] . "' that was not"
94
-            . " configured to cascade persist operations for entity: " . self::objToStr($entry) . "."
93
+            . $assoc['sourceEntity']."#".$assoc['fieldName']."' that was not"
94
+            . " configured to cascade persist operations for entity: ".self::objToStr($entry)."."
95 95
             . " To solve this issue: Either explicitly call EntityManager#persist()"
96 96
             . " on this unknown entity or configure cascade persist"
97 97
             . " this association in the mapping for example @ManyToOne(..,cascade={\"persist\"})."
98
-            . (method_exists($entry, '__toString') ? "": " If you cannot find out which entity causes the problem"
99
-            . " implement '" . $assoc['targetEntity'] . "#__toString()' to get a clue."));
98
+            . (method_exists($entry, '__toString') ? "" : " If you cannot find out which entity causes the problem"
99
+            . " implement '".$assoc['targetEntity']."#__toString()' to get a clue."));
100 100
     }
101 101
 
102 102
     /**
@@ -107,8 +107,8 @@  discard block
 block discarded – undo
107 107
      */
108 108
     static public function detachedEntityFoundThroughRelationship(array $assoc, $entry)
109 109
     {
110
-        return new self("A detached entity of type " . $assoc['targetEntity'] . " (" . self::objToStr($entry) . ") "
111
-            . " was found through the relationship '" . $assoc['sourceEntity'] . "#" . $assoc['fieldName'] . "' "
110
+        return new self("A detached entity of type ".$assoc['targetEntity']." (".self::objToStr($entry).") "
111
+            . " was found through the relationship '".$assoc['sourceEntity']."#".$assoc['fieldName']."' "
112 112
             . "during cascading a persist operation.");
113 113
     }
114 114
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
      */
120 120
     static public function entityNotManaged($entity)
121 121
     {
122
-        return new self("Entity " . self::objToStr($entity) . " is not managed. An entity is managed if its fetched " .
122
+        return new self("Entity ".self::objToStr($entity)." is not managed. An entity is managed if its fetched ".
123 123
             "from the database or registered as new through EntityManager#persist");
124 124
     }
125 125
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
      */
132 132
     static public function entityHasNoIdentity($entity, $operation)
133 133
     {
134
-        return new self("Entity has no identity, therefore " . $operation ." cannot be performed. " . self::objToStr($entity));
134
+        return new self("Entity has no identity, therefore ".$operation." cannot be performed. ".self::objToStr($entity));
135 135
     }
136 136
 
137 137
     /**
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
      */
143 143
     static public function entityIsRemoved($entity, $operation)
144 144
     {
145
-        return new self("Entity is removed, therefore " . $operation ." cannot be performed. " . self::objToStr($entity));
145
+        return new self("Entity is removed, therefore ".$operation." cannot be performed. ".self::objToStr($entity));
146 146
     }
147 147
 
148 148
     /**
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
      */
154 154
     static public function detachedEntityCannot($entity, $operation)
155 155
     {
156
-        return new self("Detached entity " . self::objToStr($entity) . " cannot be " . $operation);
156
+        return new self("Detached entity ".self::objToStr($entity)." cannot be ".$operation);
157 157
     }
158 158
 
159 159
     /**
@@ -165,8 +165,8 @@  discard block
 block discarded – undo
165 165
      */
166 166
     public static function invalidObject($context, $given, $parameterIndex = 1)
167 167
     {
168
-        return new self($context . ' expects parameter ' . $parameterIndex .
169
-            ' to be an entity object, '. gettype($given) . ' given.');
168
+        return new self($context.' expects parameter '.$parameterIndex.
169
+            ' to be an entity object, '.gettype($given).' given.');
170 170
     }
171 171
 
172 172
     /**
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
      */
175 175
     public static function invalidCompositeIdentifier()
176 176
     {
177
-        return new self("Binding an entity with a composite primary key to a query is not supported. " .
177
+        return new self("Binding an entity with a composite primary key to a query is not supported. ".
178 178
             "You should split the parameter into the explicit fields and bind them separately.");
179 179
     }
180 180
 
Please login to merge, or discard this patch.