Completed
Push — master ( c84710...977d86 )
by Antarès
02:11
created
lib/Accessible/Configuration.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      * Get the annotation reader that is used.
59 59
      * Initializes it if it doesn't already exists.
60 60
      *
61
-     * @return Reader The annotation reader.
61
+     * @return null|Reader The annotation reader.
62 62
      */
63 63
     public static function getAnnotationReader()
64 64
     {
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     /**
100 100
      * Set the constraints validator that will be used.
101 101
      *
102
-     * @param ConstraintValidator $constraintsValidator The annotation reader.
102
+     * @param ValidatorInterface $constraintsValidator The annotation reader.
103 103
      */
104 104
     public static function setConstraintsValidator(ValidatorInterface $constraintsValidator)
105 105
     {
Please login to merge, or discard this patch.
lib/Accessible/Annotation/AbstractCollectionBehavior.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
         );
57 57
 
58 58
         foreach ($defaults as $property => $defaultValue) {
59
-            $this->$property = (empty($values[$property])) ? $defaultValue: $values[$property];
59
+            $this->$property = (empty($values[$property])) ? $defaultValue : $values[$property];
60 60
         }
61 61
     }
62 62
 
Please login to merge, or discard this patch.
lib/Accessible/AutomatedBehaviorTrait.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
         }
126 126
 
127 127
         $method = $pregMatches[1];
128
-        $property = strtolower(substr($pregMatches[2], 0, 1)).substr($pregMatches[2], 1);
128
+        $property = strtolower(substr($pregMatches[2], 0, 1)) . substr($pregMatches[2], 1);
129 129
         $collectionProperties = null;
130 130
         if (in_array($method, array('add', 'remove'))) {
131 131
             $collectionProperties = $this->_collectionsItemNames['byItemName'][$property];
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
         $oldValue = null;
145 145
         $newValue = null;
146 146
 
147
-        switch($method) {
147
+        switch ($method) {
148 148
             case 'get':
149 149
             case 'is':
150 150
                 return $this->$property;
@@ -159,8 +159,8 @@  discard block
 block discarded – undo
159 159
                     && !(empty($association))
160 160
                 ) {
161 161
                     $itemName = $this->_collectionsItemNames['byProperty'][$property]['itemName'];
162
-                    $propertyAddMethod = 'add'.strtoupper(substr($itemName, 0, 1)).substr($itemName, 1);
163
-                    $propertyRemoveMethod = 'remove'.strtoupper(substr($itemName, 0, 1)).substr($itemName, 1);
162
+                    $propertyAddMethod = 'add' . strtoupper(substr($itemName, 0, 1)) . substr($itemName, 1);
163
+                    $propertyRemoveMethod = 'remove' . strtoupper(substr($itemName, 0, 1)) . substr($itemName, 1);
164 164
 
165 165
                     foreach ($this->$property as $item) {
166 166
                         $this->$propertyRemoveMethod($item);
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
                 foreach ($constraintsViolations as $violation) {
248 248
                     $errorMessageList[] = $violation->getMessage();
249 249
                 }
250
-                $errorMessage .= implode("\", \n\"", $errorMessageList)."\".";
250
+                $errorMessage .= implode("\", \n\"", $errorMessageList) . "\".";
251 251
 
252 252
                 throw new \InvalidArgumentException($errorMessage);
253 253
             }
@@ -271,16 +271,16 @@  discard block
 block discarded – undo
271 271
             $this->_associationsList = AssociationReader::getAssociations($this);
272 272
         }
273 273
 
274
-        $oldValue = empty($values['oldValue']) ? null: $values['oldValue'];
275
-        $newValue = empty($values['newValue']) ? null: $values['newValue'];
274
+        $oldValue = empty($values['oldValue']) ? null : $values['oldValue'];
275
+        $newValue = empty($values['newValue']) ? null : $values['newValue'];
276 276
 
277 277
         $association = $this->_associationsList[$property];
278 278
         if (!empty($association)) {
279 279
             $associatedProperty = $association['property'];
280 280
             switch ($association['association']) {
281 281
                 case 'inverted':
282
-                    $invertedGetMethod = 'get'.strtoupper(substr($associatedProperty, 0, 1)).substr($associatedProperty, 1);
283
-                    $invertedSetMethod = 'set'.strtoupper(substr($associatedProperty, 0, 1)).substr($associatedProperty, 1);
282
+                    $invertedGetMethod = 'get' . strtoupper(substr($associatedProperty, 0, 1)) . substr($associatedProperty, 1);
283
+                    $invertedSetMethod = 'set' . strtoupper(substr($associatedProperty, 0, 1)) . substr($associatedProperty, 1);
284 284
                     if ($oldValue !== null && $oldValue->$invertedGetMethod() === $this) {
285 285
                         $oldValue->$invertedSetMethod(null);
286 286
                     }
@@ -291,9 +291,9 @@  discard block
 block discarded – undo
291 291
 
292 292
                 case 'mapped':
293 293
                     $itemName = $association['itemName'];
294
-                    $mappedGetMethod = 'get'.strtoupper(substr($associatedProperty, 0, 1)).substr($associatedProperty, 1);
295
-                    $mappedAddMethod = 'add'.strtoupper(substr($itemName, 0, 1)).substr($itemName, 1);
296
-                    $mappedRemoveMethod = 'remove'.strtoupper(substr($itemName, 0, 1)).substr($itemName, 1);
294
+                    $mappedGetMethod = 'get' . strtoupper(substr($associatedProperty, 0, 1)) . substr($associatedProperty, 1);
295
+                    $mappedAddMethod = 'add' . strtoupper(substr($itemName, 0, 1)) . substr($itemName, 1);
296
+                    $mappedRemoveMethod = 'remove' . strtoupper(substr($itemName, 0, 1)) . substr($itemName, 1);
297 297
 
298 298
                     if ($oldValue !== null && CollectionManager::collectionContains($this, $oldValue->$mappedGetMethod())) {
299 299
                         $oldValue->$mappedRemoveMethod($this);
Please login to merge, or discard this patch.
lib/Accessible/Reader/CollectionsReader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
         array_reverse($objectClasses);
36 36
 
37 37
         $annotationReader = Configuration::getAnnotationReader();
38
-        foreach($objectClasses as $class) {
38
+        foreach ($objectClasses as $class) {
39 39
             foreach ($class->getProperties() as $property) {
40 40
                 $propertyName = $property->getName();
41 41
                 $annotation = null;
Please login to merge, or discard this patch.
lib/Accessible/Reader/Reader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
         }
36 36
 
37 37
         $parentClass = $reflectionObject->getParentClass();
38
-        while($parentClass) {
38
+        while ($parentClass) {
39 39
             $objectClasses[] = $parentClass;
40 40
 
41 41
             $parentTraits = $parentClass->getTraits();
Please login to merge, or discard this patch.
lib/Accessible/Reader/AssociationReader.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
      *   "byProperty" => "users" => ["itemName" => "user", "behavior" => "list", "methods" => ["add", "remove"]]
15 15
      * ]
16 16
      *
17
-     * @param object $object The object to read.
17
+     * @param \Accessible\AutomatedBehaviorTrait $object The object to read.
18 18
      *
19 19
      * @return array The described list.
20 20
      */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
         array_reverse($objectClasses);
36 36
 
37 37
         $annotationReader = Configuration::getAnnotationReader();
38
-        foreach($objectClasses as $class) {
38
+        foreach ($objectClasses as $class) {
39 39
             foreach ($class->getProperties() as $property) {
40 40
                 $propertyName = $property->getName();
41 41
                 $annotation = null;
Please login to merge, or discard this patch.
lib/Accessible/Reader/AccessReader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
         array_reverse($objectClasses);
36 36
 
37 37
         $annotationReader = Configuration::getAnnotationReader();
38
-        foreach($objectClasses as $class) {
38
+        foreach ($objectClasses as $class) {
39 39
             foreach ($class->getProperties() as $property) {
40 40
                 $propertyName = $property->getName();
41 41
                 $annotation = null;
Please login to merge, or discard this patch.