Test Failed
Pull Request — master (#120)
by Christopher
04:51
created
src/MetadataV3/edm/Groups/GExpressionTrait.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -687,29 +687,29 @@  discard block
 block discarded – undo
687 687
                 $counter += isset($this->$name) ? 1 : 0;
688 688
             }
689 689
             if (-1 < $this->gExpressionMinimum && $counter < $this->gExpressionMinimum) {
690
-                $msg = $counter . " fields not null.  Need minimum of ".$this->gExpressionMinimum. ": "
690
+                $msg = $counter." fields not null.  Need minimum of ".$this->gExpressionMinimum.": "
691 691
                         . get_class($this);
692 692
                 return false;
693 693
             }
694 694
             if (-1 < $this->gExpressionMaximum && $counter > $this->gExpressionMaximum) {
695
-                $msg = $counter . " fields not null.  Need maximum of ".$this->gExpressionMaximum. ": "
695
+                $msg = $counter." fields not null.  Need maximum of ".$this->gExpressionMaximum.": "
696 696
                         . get_class($this);
697 697
                 return false;
698 698
             }
699 699
         }
700 700
 
701 701
         if (null != $this->guid && !$this->isTGuidLiteralValid($this->guid)) {
702
-            $msg = "Guid must be a valid TGuidLiteral: " . get_class($this);
702
+            $msg = "Guid must be a valid TGuidLiteral: ".get_class($this);
703 703
             return false;
704 704
         }
705 705
 
706 706
         if (null != $this->enum && !$this->isTQualifiedNameValid($this->enum)) {
707
-            $msg = "Enum must be a valid TQualifiedName: " . get_class($this);
707
+            $msg = "Enum must be a valid TQualifiedName: ".get_class($this);
708 708
             return false;
709 709
         }
710 710
 
711 711
         if (null != $this->path && !$this->isTQualifiedNameValid($this->path)) {
712
-            $msg = "Path must be a valid TQualifiedName: " . get_class($this);
712
+            $msg = "Path must be a valid TQualifiedName: ".get_class($this);
713 713
             return false;
714 714
         }
715 715
 
@@ -725,7 +725,7 @@  discard block
 block discarded – undo
725 725
                 return false;
726 726
             }
727 727
             if (!$this->isObjectNullOrType($type, $this->$key)) {
728
-                $msg = 'Type mismatch - should be ' . $type . ", is " . get_class($this->$key) . ": " . get_class($this);
728
+                $msg = 'Type mismatch - should be '.$type.", is ".get_class($this->$key).": ".get_class($this);
729 729
                 return false;
730 730
             }
731 731
         }
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@
 block discarded – undo
142 142
     /**
143 143
      * Sets a new binary
144 144
      *
145
-     * @param  mixed $binary
145
+     * @param  string $binary
146 146
      * @return self
147 147
      */
148 148
     public function setBinary($binary)
Please login to merge, or discard this patch.
src/IsOKTraits/IsOKToolboxTrait.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
             return true;
76 76
         }
77 77
         if (!$object instanceof $instanceOf) {
78
-            $msg = "Supplied object not an instance of " . $instanceOf . ": " . get_class($this);
78
+            $msg = "Supplied object not an instance of ".$instanceOf.": ".get_class($this);
79 79
             return false;
80 80
         }
81 81
         return $object->isOK($msg);
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     {
86 86
         $result = $this->isValidArray($arr, $instanceOf, $minCount, $maxCount);
87 87
         if (!$result) {
88
-            $msg = "Supplied array not a valid array: " . get_class($this);
88
+            $msg = "Supplied array not a valid array: ".get_class($this);
89 89
             return false;
90 90
         }
91 91
 
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
         }
118 118
         foreach ($arr as $item) {
119 119
             if (!($item instanceof IsOK)) {
120
-                $msg = "Child item is not an instance of IsOK: " . get_class($this);
120
+                $msg = "Child item is not an instance of IsOK: ".get_class($this);
121 121
                 return false;
122 122
             }
123 123
             if (!$item->isOK($msg)) {
Please login to merge, or discard this patch.
src/StringTraits/XSDTopLevelTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
             $rawDate = $input;
83 83
         }
84 84
 
85
-        return $rawDate->format('Y-m-d') . 'T' . $rawDate->format('H:i:s');
85
+        return $rawDate->format('Y-m-d').'T'.$rawDate->format('H:i:s');
86 86
     }
87 87
 
88 88
     public function hexBinary($input)
Please login to merge, or discard this patch.
src/MetadataV3/edm/IsOKTraits/EDMSimpleTypeTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
     public function isEDMSimpleTypeValid($string)
15 15
     {
16 16
         if (!is_string($string)) {
17
-            $msg = "Input must be a string: " . get_class($this);
17
+            $msg = "Input must be a string: ".get_class($this);
18 18
             throw new \InvalidArgumentException($msg);
19 19
         }
20 20
         if (!in_array($string, static::$v3EDMSimpleType)) {
Please login to merge, or discard this patch.
src/MetadataV3/edm/EntityContainer/AssociationSetAnonymousType.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     /**
112 112
      * isset end
113 113
      *
114
-     * @param  scalar $index
114
+     * @param  integer $index
115 115
      * @return boolean
116 116
      */
117 117
     public function issetEnd($index)
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
     /**
123 123
      * unset end
124 124
      *
125
-     * @param  scalar $index
125
+     * @param  integer $index
126 126
      * @return void
127 127
      */
128 128
     public function unsetEnd($index)
Please login to merge, or discard this patch.
src/MetadataV3/edm/EntityContainer/FunctionImportAnonymousType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@
 block discarded – undo
146 146
             for ($j = $i + 1; $j < $numParms; $j++) {
147 147
                 assert(
148 148
                     $this->parameter[$j] instanceof TFunctionImportParameterType,
149
-                    get_class($this->parameter[$j]). ' ' . $j
149
+                    get_class($this->parameter[$j]).' '.$j
150 150
                 );
151 151
                 $inName = $this->parameter[$j]->getName();
152 152
                 if ($outName == $inName) {
Please login to merge, or discard this patch.
src/MetadataV3/edm/IsOKTraits/TQualifiedNameTrait.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -9,6 +9,9 @@
 block discarded – undo
9 9
 {
10 10
     use xsdRestrictions;
11 11
 
12
+    /**
13
+     * @return boolean
14
+     */
12 15
     public function isTQualifiedNameValid($string)
13 16
     {
14 17
         assert($this instanceof IsOK);
Please login to merge, or discard this patch.
src/MetadataV3/edm/IsOKTraits/TPropertyTypeTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
         //$regex = "/[\p{L}\p{Nl}][\p{L}\p{Nl}\p{Nd}\p{Mn}\p{Mc}\p{Pc}\p{Cf}]{0,}(\.[\p{L}\p{Nl}][\p{L}\p{Nl}\p{Nd}\p{Mn}\p{Mc}\p{Pc}\p{Cf}]{0,}){0,}/";
18 18
 
19 19
         if (!is_string($string)) {
20
-            $msg = "Input must be a string: " . get_class($this);
20
+            $msg = "Input must be a string: ".get_class($this);
21 21
             throw new \InvalidArgumentException($msg);
22 22
         }
23 23
         if (isset(static::$v3PropertyTypeCache[$string])) {
Please login to merge, or discard this patch.
tests/MetadataManagerNavigationTest.php 2 patches
Unused Use Statements   -14 removed lines patch added patch discarded remove patch
@@ -2,21 +2,7 @@
 block discarded – undo
2 2
 
3 3
 namespace AlgoWeb\ODataMetadata\Tests;
4 4
 
5
-use AlgoWeb\ODataMetadata\IsOK;
6 5
 use AlgoWeb\ODataMetadata\MetadataManager;
7
-use AlgoWeb\ODataMetadata\MetadataV3\edm\EntityContainer;
8
-use AlgoWeb\ODataMetadata\MetadataV3\edm\Schema;
9
-use AlgoWeb\ODataMetadata\MetadataV3\edm\TAssociationType;
10
-use AlgoWeb\ODataMetadata\MetadataV3\edm\TComplexTypePropertyType;
11
-use AlgoWeb\ODataMetadata\MetadataV3\edm\TComplexTypeType;
12
-use AlgoWeb\ODataMetadata\MetadataV3\edm\TEntityPropertyType;
13
-use AlgoWeb\ODataMetadata\MetadataV3\edm\TEntityTypeType;
14
-use AlgoWeb\ODataMetadata\MetadataV3\edm\TFunctionReturnTypeType;
15
-use AlgoWeb\ODataMetadata\MetadataV3\edm\TFunctionType;
16
-use AlgoWeb\ODataMetadata\MetadataV3\edm\TNavigationPropertyType;
17
-use AlgoWeb\ODataMetadata\MetadataV3\edm\TTextType;
18
-use AlgoWeb\ODataMetadata\MetadataV3\edmx\Edmx;
19
-use Mockery as m;
20 6
 
21 7
 class MetadataManagerNavigationTest extends \PHPUnit_Framework_TestCase
22 8
 {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
         $result = null;
28 28
 
29 29
         list($CategoryType, $result) = $metadataManager->addEntityType("Category");
30
-        $this->assertNotFalse($CategoryType, "Etype is false not type " . $metadataManager->getLastError());
30
+        $this->assertNotFalse($CategoryType, "Etype is false not type ".$metadataManager->getLastError());
31 31
         $metadataManager->addPropertyToEntityType($CategoryType, "CategoryID", "Int32", null, false, true, "Identity");
32 32
         $metadataManager->addPropertyToEntityType($CategoryType, "CategoryName", "String");
33 33
         $metadataManager->addPropertyToEntityType($CategoryType, "Description", "String");
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         $this->assertTrue($metadataManager->getEdmx()->isOK($msg), $msg);
114 114
 
115 115
         $expectedRelation = "Data.Category_Products_Product_Category";
116
-        list($principalNav, ) = $metadataManager->addNavigationPropertyToEntityType(
116
+        list($principalNav,) = $metadataManager->addNavigationPropertyToEntityType(
117 117
             $CategoryType, "*", "Products", $ProductType, "1", "Category", ["CategoryID"], ["CategoryID"]
118 118
         );
119 119
         $this->assertEquals($expectedRelation, $principalNav->getRelationship());
Please login to merge, or discard this patch.