Skip to content
This repository

[Server] & [Soap] Typos and docblocks #2844

Closed
wants to merge 3 commits into from

2 participants

Maks Matthew Weier O'Phinney
Maks
Collaborator

Fix typos and docblocks

Add some typehint to method argument

Remove code marked as deprecated since ZF1

library/Zend/Server/Reflection/AbstractFunction.php
((6 lines not shown))
83 83
      * @param null|string $namespace
84 84
      * @param null|array $argv
85 85
      * @throws Exception\InvalidArgumentException
86 86
      * @throws Exception\RuntimeException
87 87
      */
88  
-    public function __construct(\Reflector $r, $namespace = null, $argv = array())
  88
+    public function __construct(\ReflectionFunctionAbstract $r, $namespace = null, $argv = array())
1
Matthew Weier O'Phinney Owner

Import ReflectionFunctionAbstract.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
library/Zend/Server/Reflection/ReflectionClass.php
@@ -43,7 +43,7 @@ class ReflectionClass
43 43
 
44 44
     /**
45 45
      * ReflectionClass object
46  
-     * @var ReflectionClass
  46
+     * @var \ReflectionClass
1
Matthew Weier O'Phinney Owner

If this is used in the code anywhere, import it. If not, it's fine. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
library/Zend/Soap/Server/DocumentLiteralWrapper.php
@@ -123,6 +123,7 @@ public function __call($method, $args)
123 123
     protected function _parseArguments($method, $document)
124 124
     {
125 125
         $reflMethod = $this->reflection->getMethod($method);
  126
+        /** @var \Zend\Server\Reflection\ReflectionParameter[] $params  */
1
Matthew Weier O'Phinney Owner

Can these IDE hints be done without using docblock notation? I.e., use the following:

/* @var \Zend\Server\Reflection\ReflectionParameter[] $params */

I ask, as in vim, it messes up syntax highlighting when the extra "*" is in there. If it can't that's fine; just curious.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Matthew Weier O'Phinney weierophinney closed this in af1a19b October 30, 2012
Matthew Weier O'Phinney

Awesome -- thanks! Been on my todo list for a looooong time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
4  library/Zend/Server/Definition.php
@@ -58,7 +58,7 @@ public function setOverwriteExistingMethods($flag)
58 58
      * @param  array|\Zend\Server\Method\Definition $method
59 59
      * @param  null|string $name
60 60
      * @return \Zend\Server\Definition
61  
-     * @throws \Zend\Server\Exception\ExceptionInterface if duplicate or invalid method provided
  61
+     * @throws \Zend\Server\Exception\InvalidArgumentException if duplicate or invalid method provided
62 62
      */
63 63
     public function addMethod($method, $name = null)
64 64
     {
@@ -235,7 +235,7 @@ public function next()
235 235
      */
236 236
     public function rewind()
237 237
     {
238  
-        return reset($this->methods);
  238
+        reset($this->methods);
239 239
     }
240 240
 
241 241
     /**
4  library/Zend/Server/Reflection.php
@@ -36,7 +36,7 @@ class Reflection
36 36
      * method name (used for the signature key). Primarily to avoid collisions,
37 37
      * also for XmlRpc namespacing
38 38
      * @return \Zend\Server\Reflection\ReflectionClass
39  
-     * @throws \Zend\Server\Reflection\Exception\ExceptionInterface
  39
+     * @throws \Zend\Server\Reflection\Exception\InvalidArgumentException
40 40
      */
41 41
     public static function reflectClass($class, $argv = false, $namespace = '')
42 42
     {
@@ -70,7 +70,7 @@ public static function reflectClass($class, $argv = false, $namespace = '')
70 70
      * function name (used for the signature key). Primarily to avoid
71 71
      * collisions, also for XmlRpc namespacing
72 72
      * @return \Zend\Server\Reflection\ReflectionFunction
73  
-     * @throws \Zend\Server\Reflection\Exception\ExceptionInterface
  73
+     * @throws \Zend\Server\Reflection\Exception\InvalidArgumentException
74 74
      */
75 75
     public static function reflectFunction($function, $argv = false, $namespace = '')
76 76
     {
31  library/Zend/Server/Reflection/AbstractFunction.php
@@ -10,6 +10,11 @@
10 10
 
11 11
 namespace Zend\Server\Reflection;
12 12
 
  13
+use ReflectionFunctionAbstract;
  14
+use ReflectionClass as PhpReflectionClass;
  15
+use ReflectionFunction as PhpReflectionFunction;
  16
+use ReflectionMethod as PhpReflectionMethod;
  17
+
13 18
 /**
14 19
  * Function/Method Reflection
15 20
  *
@@ -27,7 +32,7 @@
27 32
 abstract class AbstractFunction
28 33
 {
29 34
     /**
30  
-     * @var ReflectionFunction
  35
+     * @var ReflectionFunctionAbstract
31 36
      */
32 37
     protected $reflection;
33 38
 
@@ -79,22 +84,14 @@
79 84
     /**
80 85
      * Constructor
81 86
      *
82  
-     * @param \Reflector $r
  87
+     * @param ReflectionFunctionAbstract $r
83 88
      * @param null|string $namespace
84 89
      * @param null|array $argv
85 90
      * @throws Exception\InvalidArgumentException
86 91
      * @throws Exception\RuntimeException
87 92
      */
88  
-    public function __construct(\Reflector $r, $namespace = null, $argv = array())
  93
+    public function __construct(ReflectionFunctionAbstract $r, $namespace = null, $argv = array())
89 94
     {
90  
-        // In PHP 5.1.x, ReflectionMethod extends ReflectionFunction. In 5.2.x,
91  
-        // both extend ReflectionFunctionAbstract. So, we can't do normal type
92  
-        // hinting in the prototype, but instead need to do some explicit
93  
-        // testing here.
94  
-        if ((!$r instanceof \ReflectionFunction)
95  
-            && (!$r instanceof \ReflectionMethod)) {
96  
-            throw new Exception\InvalidArgumentException('Invalid reflection class');
97  
-        }
98 95
         $this->reflection = $r;
99 96
 
100 97
         // Determine namespace
@@ -108,7 +105,7 @@ public function __construct(\Reflector $r, $namespace = null, $argv = array())
108 105
         }
109 106
 
110 107
         // If method call, need to store some info on the class
111  
-        if ($r instanceof \ReflectionMethod) {
  108
+        if ($r instanceof PhpReflectionMethod) {
112 109
             $this->class = $r->getDeclaringClass()->getName();
113 110
         }
114 111
 
@@ -448,7 +445,7 @@ public function getDescription()
448 445
      * Retrieve all prototypes as array of
449 446
      * {@link \Zend\Server\Reflection\Prototype}s
450 447
      *
451  
-     * @return array
  448
+     * @return Prototype[]
452 449
      */
453 450
     public function getPrototypes()
454 451
     {
@@ -475,11 +472,11 @@ public function getInvokeArguments()
475 472
      */
476 473
     public function __wakeup()
477 474
     {
478  
-        if ($this->reflection instanceof \ReflectionMethod) {
479  
-            $class = new \ReflectionClass($this->class);
480  
-            $this->reflection = new \ReflectionMethod($class->newInstance(), $this->getName());
  475
+        if ($this->reflection instanceof PhpReflectionMethod) {
  476
+            $class = new PhpReflectionClass($this->class);
  477
+            $this->reflection = new PhpReflectionMethod($class->newInstance(), $this->getName());
481 478
         } else {
482  
-            $this->reflection = new \ReflectionFunction($this->getName());
  479
+            $this->reflection = new PhpReflectionFunction($this->getName());
483 480
         }
484 481
     }
485 482
 }
22  library/Zend/Server/Reflection/Prototype.php
@@ -21,26 +21,23 @@
21 21
  */
22 22
 class Prototype
23 23
 {
  24
+    /** @var ReflectionParameter[] */
  25
+    protected $params;
  26
+
24 27
     /**
25 28
      * Constructor
26 29
      *
27 30
      * @param ReflectionReturnValue $return
28  
-     * @param array $params
  31
+     * @param ReflectionParameter[] $params
29 32
      * @throws Exception\InvalidArgumentException
30 33
      */
31  
-    public function __construct(ReflectionReturnValue $return, $params = null)
  34
+    public function __construct(ReflectionReturnValue $return, array $params = array())
32 35
     {
33 36
         $this->return = $return;
34 37
 
35  
-        if (!is_array($params) && (null !== $params)) {
36  
-            throw new Exception\InvalidArgumentException('Invalid parameters');
37  
-        }
38  
-
39  
-        if (is_array($params)) {
40  
-            foreach ($params as $param) {
41  
-                if (!$param instanceof ReflectionParameter) {
42  
-                    throw new Exception\InvalidArgumentException('One or more params are invalid');
43  
-                }
  38
+        foreach ($params as $param) {
  39
+            if (!$param instanceof ReflectionParameter) {
  40
+                throw new Exception\InvalidArgumentException('One or more params are invalid');
44 41
             }
45 42
         }
46 43
 
@@ -60,7 +57,6 @@ public function getReturnType()
60 57
     /**
61 58
      * Retrieve the return value object
62 59
      *
63  
-     * @access public
64 60
      * @return \Zend\Server\Reflection\ReflectionReturnValue
65 61
      */
66 62
     public function getReturnValue()
@@ -71,7 +67,7 @@ public function getReturnValue()
71 67
     /**
72 68
      * Retrieve method parameters
73 69
      *
74  
-     * @return array Array of {@link \Zend\Server\Reflection\ReflectionParameter}s
  70
+     * @return ReflectionParameter[] Array of {@link \Zend\Server\Reflection\ReflectionParameter}s
75 71
      */
76 72
     public function getParameters()
77 73
     {
10  library/Zend/Server/Reflection/ReflectionClass.php
@@ -10,6 +10,8 @@
10 10
 
11 11
 namespace Zend\Server\Reflection;
12 12
 
  13
+use ReflectionClass as PhpReflectionClass;
  14
+
13 15
 /**
14 16
  * Class/Object reflection
15 17
  *
@@ -43,7 +45,7 @@ class ReflectionClass
43 45
 
44 46
     /**
45 47
      * ReflectionClass object
46  
-     * @var ReflectionClass
  48
+     * @var PhpReflectionClass
47 49
      */
48 50
     protected $reflection;
49 51
 
@@ -53,11 +55,11 @@ class ReflectionClass
53 55
      * Create array of dispatchable methods, each a
54 56
      * {@link Zend\Server\Reflection\ReflectionMethod}. Sets reflection object property.
55 57
      *
56  
-     * @param \ReflectionClass $reflection
  58
+     * @param PhpReflectionClass $reflection
57 59
      * @param string $namespace
58 60
      * @param mixed $argv
59 61
      */
60  
-    public function __construct(\ReflectionClass $reflection, $namespace = null, $argv = false)
  62
+    public function __construct(PhpReflectionClass $reflection, $namespace = null, $argv = false)
61 63
     {
62 64
         $this->reflection = $reflection;
63 65
         $this->setNamespace($namespace);
@@ -176,6 +178,6 @@ public function setNamespace($namespace)
176 178
      */
177 179
     public function __wakeup()
178 180
     {
179  
-        $this->reflection = new \ReflectionClass($this->getName());
  181
+        $this->reflection = new PhpReflectionClass($this->getName());
180 182
     }
181 183
 }
2  library/Zend/Server/Reflection/ReflectionParameter.php
@@ -22,7 +22,7 @@
22 22
 class ReflectionParameter
23 23
 {
24 24
     /**
25  
-     * @var ReflectionParameter
  25
+     * @var \ReflectionParameter
26 26
      */
27 27
     protected $reflection;
28 28
 
2  library/Zend/Server/Server.php
@@ -65,7 +65,7 @@ public function fault($fault = null, $code = 404);
65 65
     /**
66 66
      * Handle a request
67 67
      *
68  
-     * Requests may be passed in, or the server may automagically determine the
  68
+     * Requests may be passed in, or the server may automatically determine the
69 69
      * request based on defaults. Dispatches server request to appropriate
70 70
      * method and returns a response
71 71
      *
4  library/Zend/Soap/AutoDiscover.php
@@ -12,7 +12,6 @@
12 12
 
13 13
 use Zend\Server\Reflection;
14 14
 use Zend\Server\Reflection\AbstractFunction;
15  
-use Zend\Server\Reflection\Prototype;
16 15
 use Zend\Soap\AutoDiscover\DiscoveryStrategy\DiscoveryStrategyInterface as DiscoveryStrategy;
17 16
 use Zend\Soap\AutoDiscover\DiscoveryStrategy\ReflectionDiscovery;
18 17
 use Zend\Soap\Wsdl;
@@ -200,7 +199,7 @@ public function getServiceName()
200 199
 
201 200
 
202 201
     /**
203  
-     * Set the location at which the WSDL file will be availabe.
  202
+     * Set the location at which the WSDL file will be available.
204 203
      *
205 204
      * @param  Uri\Uri|string $uri
206 205
      * @return AutoDiscover
@@ -376,6 +375,7 @@ protected function _generateWsdl(array $reflectionMethods)
376 375
         $uri = $this->getUri();
377 376
 
378 377
         $serviceName = $this->getServiceName();
  378
+        /** @var Wsdl $wsdl  */
379 379
         $wsdl = new $this->wsdlClass($serviceName, $uri, $this->strategy, $this->classMap);
380 380
 
381 381
         // The wsdl:types element must precede all other elements (WS-I Basic Profile 1.1 R2023)
19  library/Zend/Soap/Client.php
@@ -318,7 +318,7 @@ public function getOptions()
318 318
      *
319 319
      * @param  int $version One of the SOAP_1_1 or SOAP_1_2 constants
320 320
      * @return Client
321  
-     * @throws Exception\ExceptionInterface with invalid soap version argument
  321
+     * @throws Exception\InvalidArgumentException with invalid soap version argument
322 322
      */
323 323
     public function setSoapVersion($version)
324 324
     {
@@ -347,7 +347,7 @@ public function getSoapVersion()
347 347
      *
348 348
      * @param  array $classmap
349 349
      * @return Client
350  
-     * @throws Exception\ExceptionInterface for any invalid class in the class map
  350
+     * @throws Exception\InvalidArgumentException for any invalid class in the class map
351 351
      */
352 352
     public function setClassmap(array $classmap)
353 353
     {
@@ -378,7 +378,7 @@ public function getClassmap()
378 378
      *
379 379
      * @param  string $encoding
380 380
      * @return Client
381  
-     * @throws Exception\ExceptionInterface with invalid encoding argument
  381
+     * @throws Exception\InvalidArgumentException with invalid encoding argument
382 382
      */
383 383
     public function setEncoding($encoding)
384 384
     {
@@ -408,7 +408,7 @@ public function getEncoding()
408 408
      *
409 409
      * @param  string $urn
410 410
      * @return boolean
411  
-     * @throws Exception\ExceptionInterface on invalid URN
  411
+     * @throws Exception\InvalidArgumentException on invalid URN
412 412
      */
413 413
     public function validateUrn($urn)
414 414
     {
@@ -484,7 +484,7 @@ public function getLocation()
484 484
      *
485 485
      * @param  int $style One of the SOAP_RPC or SOAP_DOCUMENT constants
486 486
      * @return Client
487  
-     * @throws Exception\ExceptionInterface with invalid style argument
  487
+     * @throws Exception\InvalidArgumentException with invalid style argument
488 488
      */
489 489
     public function setStyle($style)
490 490
     {
@@ -514,7 +514,7 @@ public function getStyle()
514 514
      *
515 515
      * @param  int $use One of the SOAP_ENCODED or SOAP_LITERAL constants
516 516
      * @return Client
517  
-     * @throws Exception\ExceptionInterface with invalid message encoding method argument
  517
+     * @throws Exception\InvalidArgumentException with invalid message encoding method argument
518 518
      */
519 519
     public function setEncodingMethod($use)
520 520
     {
@@ -684,7 +684,7 @@ public function setProxyPassword($proxyPassword)
684 684
      *
685 685
      * @param  string $localCert local certificate path
686 686
      * @return Client
687  
-     * @throws Exception\ExceptionInterface with invalid local certificate path argument
  687
+     * @throws Exception\InvalidArgumentException with invalid local certificate path argument
688 688
      */
689 689
     public function setHttpsCertificate($localCert)
690 690
     {
@@ -777,6 +777,7 @@ public function getProxyPassword()
777 777
      *
778 778
      * @param  resource $context
779 779
      * @return Client
  780
+     * @throws Exception\InvalidArgumentException if $context is not a valid stream resource
780 781
      */
781 782
     public function setStreamContext($context)
782 783
     {
@@ -1108,7 +1109,7 @@ public function call($method, $params = array())
1108 1109
      * Return a list of available functions
1109 1110
      *
1110 1111
      * @return array
1111  
-     * @throws Exception\ExceptionInterface
  1112
+     * @throws Exception\UnexpectedValueException
1112 1113
      */
1113 1114
     public function getFunctions()
1114 1115
     {
@@ -1131,7 +1132,7 @@ public function getFunctions()
1131 1132
      * Return a list of SOAP types
1132 1133
      *
1133 1134
      * @return array
1134  
-     * @throws Exception\ExceptionInterface
  1135
+     * @throws Exception\UnexpectedValueException
1135 1136
      */
1136 1137
     public function getTypes()
1137 1138
     {
4  library/Zend/Soap/Server.php
@@ -198,8 +198,6 @@ public function setOptions($options)
198 198
                 case 'wsdl':
199 199
                     $this->setWSDL($value);
200 200
                     break;
201  
-                case 'featues':
202  
-                    trigger_error(__METHOD__ . ': the option "featues" is deprecated as of 1.10.x and will be removed with 2.0.0; use "features" instead', E_USER_NOTICE);
203 201
                 case 'features':
204 202
                     $this->setSoapFeatures($value);
205 203
                     break;
@@ -630,7 +628,7 @@ public function setPersistence($mode)
630 628
     /**
631 629
      * Get server persistence
632 630
      *
633  
-     * @return Server
  631
+     * @return int
634 632
      */
635 633
     public function getPersistence()
636 634
     {
1  library/Zend/Soap/Server/DocumentLiteralWrapper.php
@@ -123,6 +123,7 @@ public function __call($method, $args)
123 123
     protected function _parseArguments($method, $document)
124 124
     {
125 125
         $reflMethod = $this->reflection->getMethod($method);
  126
+        /* @var \Zend\Server\Reflection\ReflectionParameter[] $params  */
126 127
         $params = array();
127 128
         foreach ($reflMethod->getParameters() as $param) {
128 129
             $params[$param->getName()] = $param;
36  library/Zend/Soap/Wsdl.php
@@ -10,6 +10,7 @@
10 10
 
11 11
 namespace Zend\Soap;
12 12
 
  13
+use DOMNode;
13 14
 use DOMDocument;
14 15
 use DOMElement;
15 16
 use Zend\Soap\Wsdl\ComplexTypeStrategy\ComplexTypeStrategyInterface as ComplexTypeStrategy;
@@ -24,7 +25,7 @@
24 25
 class Wsdl
25 26
 {
26 27
     /**
27  
-     * @var object DomDocument Instance
  28
+     * @var DOMDocument DOM document Instance
28 29
      */
29 30
     private $dom;
30 31
 
@@ -81,7 +82,7 @@ public function __construct($name, $uri, ComplexTypeStrategy $strategy = null, a
81 82
 
82 83
         /**
83 84
          * @todo change DomDocument object creation from cparsing to constructing using API
84  
-         * It also should authomatically escape $name and $uri values if necessary
  85
+         * It also should automatically escape $name and $uri values if necessary
85 86
          */
86 87
         $wsdl = "<?xml version='1.0' ?>
87 88
                 <definitions name='$name' targetNamespace='$uri'
@@ -94,7 +95,7 @@ public function __construct($name, $uri, ComplexTypeStrategy $strategy = null, a
94 95
         libxml_disable_entity_loader(true);
95 96
         $this->dom = new DOMDocument();
96 97
         if (!$this->dom->loadXML($wsdl)) {
97  
-            throw new Exception\RuntimeException('Unable to create DomDocument');
  98
+            throw new Exception\RuntimeException('Unable to create DOMDocument');
98 99
         } else {
99 100
             foreach ($this->dom->childNodes as $child) {
100 101
                 if ($child->nodeType === XML_DOCUMENT_TYPE_NODE) {
@@ -235,7 +236,7 @@ public function addPortType($name)
235 236
      * @param string $input Input Message
236 237
      * @param string $output Output Message
237 238
      * @param string $fault Fault Message
238  
-     * @return object The new operation's XML_Tree_Node for use in {@link function addDocumentation}
  239
+     * @return DOMElement The new operation's XML_Tree_Node for use in {@link function addDocumentation}
239 240
      */
240 241
     public function addPortOperation($portType, $name, $input = false, $output = false, $fault = false)
241 242
     {
@@ -288,7 +289,7 @@ public function addBinding($name, $portType)
288 289
      * @param array $input An array of attributes for the input element, allowed keys are: 'use', 'namespace', 'encodingStyle'. {@link http://www.w3.org/TR/wsdl#_soap:body More Information}
289 290
      * @param array $output An array of attributes for the output element, allowed keys are: 'use', 'namespace', 'encodingStyle'. {@link http://www.w3.org/TR/wsdl#_soap:body More Information}
290 291
      * @param array $fault An array of attributes for the fault element, allowed keys are: 'name', 'use', 'namespace', 'encodingStyle'. {@link http://www.w3.org/TR/wsdl#_soap:body More Information}
291  
-     * @return object The new Operation's XML_Tree_Node for use with {@link function addSoapOperation} and {@link function addDocumentation}
  292
+     * @return DOMElement The new Operation's XML_Tree_Node for use with {@link function addSoapOperation} and {@link function addDocumentation}
292 293
      */
293 294
     public function addBindingOperation($binding, $name, $input = false, $output = false, $fault = false)
294 295
     {
@@ -355,11 +356,11 @@ public function addSoapBinding($binding, $style = 'document', $transport = 'http
355 356
     /**
356 357
      * Add a {@link http://www.w3.org/TR/wsdl#_soap:operation SOAP operation} to an operation element
357 358
      *
358  
-     * @param object $operation An operation XML_Tree_Node returned by {@link function addBindingOperation}
359  
-     * @param string $soap_action SOAP Action
  359
+     * @param DOMElement $binding     An operation XML_Tree_Node returned by {@link function addBindingOperation}
  360
+     * @param string|Uri $soap_action SOAP Action
360 361
      * @return boolean
361 362
      */
362  
-    public function addSoapOperation($binding, $soap_action)
  363
+    public function addSoapOperation(DOMElement $binding, $soap_action)
363 364
     {
364 365
         if ($soap_action instanceof Uri) {
365 366
             $soap_action = $soap_action->toString();
@@ -379,7 +380,7 @@ public function addSoapOperation($binding, $soap_action)
379 380
      * @param string $port_name Name of the port for the service
380 381
      * @param string $binding Binding for the port
381 382
      * @param string $location SOAP Address for the service
382  
-     * @return object The new service's XML_Tree_Node for use with {@link function addDocumentation}
  383
+     * @return DOMElement The new service's XML_Tree_Node for use with {@link function addDocumentation}
383 384
      */
384 385
     public function addService($name, $port_name, $binding, $location)
385 386
     {
@@ -439,14 +440,14 @@ public function addDocumentation($input_node, $documentation)
439 440
     /**
440 441
      * Add WSDL Types element
441 442
      *
442  
-     * @param object $types A DomDocument|DomNode|DomElement|DomDocumentFragment with all the XML Schema types defined in it
  443
+     * @param DOMNode $types A DOM Node with all the XML Schema types defined in it
443 444
      */
444  
-    public function addTypes($types)
  445
+    public function addTypes(DOMNode $types)
445 446
     {
446  
-        if ($types instanceof \DomDocument) {
447  
-            $dom = $this->dom->importNode($types->documentElement);
  447
+        if ($types instanceof DOMDocument) {
  448
+            $this->dom->importNode($types->documentElement);
448 449
             $this->wsdl->appendChild($types->documentElement);
449  
-        } elseif ($types instanceof \DomNode || $types instanceof \DomElement || $types instanceof \DomDocumentFragment ) {
  450
+        } else {
450 451
             $dom = $this->dom->importNode($types);
451 452
             $this->wsdl->appendChild($dom);
452 453
         }
@@ -504,7 +505,7 @@ public function toXML()
504 505
     /**
505 506
      * Return DOM Document
506 507
      *
507  
-     * @return object DomDocum ent
  508
+     * @return DOMDocument
508 509
      */
509 510
     public function toDomDocument()
510 511
     {
@@ -512,8 +513,9 @@ public function toDomDocument()
512 513
     }
513 514
 
514 515
     /**
515  
-     * Echo the WSDL as XML
  516
+     * Echo the WSDL as XML to stdout or save the WSDL to a file
516 517
      *
  518
+     * @param string $filename Filename to save the output (Optional)
517 519
      * @return boolean
518 520
      */
519 521
     public function dump($filename = false)
@@ -522,7 +524,7 @@ public function dump($filename = false)
522 524
             echo $this->toXML();
523 525
             return true;
524 526
         }
525  
-        return file_put_contents($filename, $this->toXML());
  527
+        return (bool) file_put_contents($filename, $this->toXML());
526 528
     }
527 529
 
528 530
     /**
2  library/Zend/Soap/Wsdl/ComplexTypeStrategy/ArrayOfTypeSequence.php
@@ -10,8 +10,6 @@
10 10
 
11 11
 namespace Zend\Soap\Wsdl\ComplexTypeStrategy;
12 12
 
13  
-use Zend\Soap\Wsdl;
14  
-
15 13
 /**
16 14
  * Zend_Soap_Wsdl_Strategy_ArrayOfTypeSequence
17 15
  *
2  library/Zend/Soap/Wsdl/ComplexTypeStrategy/DefaultComplexType.php
@@ -22,7 +22,7 @@
22 22
 class DefaultComplexType extends AbstractComplexTypeStrategy
23 23
 {
24 24
     /**
25  
-     * Add a complex type by recursivly using all the class properties fetched via Reflection.
  25
+     * Add a complex type by recursively using all the class properties fetched via Reflection.
26 26
      *
27 27
      * @param  string $type Name of the class to be specified
28 28
      * @throws Exception\InvalidArgumentException if class does not exist
6  tests/ZendTest/Server/Reflection/PrototypeTest.php
@@ -91,12 +91,6 @@ public function testConstructionThrowsExceptionOnInvalidParam()
91 91
         $r1 = new Reflection\Prototype($this->_r->getReturnValue(), $this->_parametersRaw);
92 92
     }
93 93
 
94  
-    public function testConstructionThrowsExceptionOnInvalidParamType()
95  
-    {
96  
-        $this->setExpectedException('Zend\Server\Reflection\Exception\InvalidArgumentException', 'Invalid parameters');
97  
-        $r1 = new Reflection\Prototype($this->_r->getReturnValue(), 'string');
98  
-    }
99  
-
100 94
     /**
101 95
      * getReturnType() test
102 96
      *
10  tests/ZendTest/Server/Reflection/ReflectionFunctionTest.php
@@ -41,16 +41,6 @@ public function test__construct()
41 41
         $this->assertTrue(0 < count($prototypes));
42 42
     }
43 43
 
44  
-    public function testConstructorThrowsExceptionOnNonFunction()
45  
-    {
46  
-        $function = new \ReflectionFunction('\ZendTest\Server\Reflection\function1');
47  
-        $r = new Reflection\ReflectionFunction($function);
48  
-        $params = $r->getParameters();
49  
-
50  
-        $this->setExpectedException('Zend\Server\Reflection\Exception\InvalidArgumentException', 'Invalid reflection class');
51  
-        $r = new Reflection\ReflectionFunction($params[0]);
52  
-    }
53  
-
54 44
     public function test__getSet()
55 45
     {
56 46
         $function = new \ReflectionFunction('\ZendTest\Server\Reflection\function1');
9  tests/ZendTest/Soap/ServerTest.php
@@ -648,9 +648,6 @@ public function testHandle()
648 648
         $this->assertEquals($expectedResponse, $server1->handle($request));
649 649
     }
650 650
 
651  
-    /**
652  
-     * @todo Implement testRegisterFaultException().
653  
-     */
654 651
     public function testRegisterFaultException()
655 652
     {
656 653
         $server = new Server();
@@ -665,9 +662,6 @@ public function testRegisterFaultException()
665 662
         ), $server->getFaultExceptions());
666 663
     }
667 664
 
668  
-    /**
669  
-     * @todo Implement testDeregisterFaultException().
670  
-     */
671 665
     public function testDeregisterFaultException()
672 666
     {
673 667
         $server = new Server();
@@ -684,9 +678,6 @@ public function testDeregisterFaultException()
684 678
         $this->assertFalse($ret);
685 679
     }
686 680
 
687  
-    /**
688  
-     * @todo Implement testGetFaultExceptions().
689  
-     */
690 681
     public function testGetFaultExceptions()
691 682
     {
692 683
         $server = new Server();
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.