Debian Codegraph @

vendor/mck89/peast/lib/Peast/Syntax/Node/AssignmentProperty.php

raw
1 <?php
2 /**
3 * This file is part of the Peast package
4 *
5 * (c) Marco Marchiò <[email protected]>
6 *
7 * For the full copyright and license information refer to the LICENSE file
8 * distributed with this source code
9 */
10 namespace Peast\Syntax\Node;
11
12 /**
13 * A node that represents a property in an object binding pattern.
14 * For example "a" in: var {a} = b
15 *
16 * @author Marco Marchiò <[email protected]>
17 */
18 class AssignmentProperty extends Property
19 {
20 /**
21 * Returns node's type
22 *
23 * @return string
24 */
25 public function getType()
26 {
27 return "Property";
28 }
29
30 /**
31 * Sets the property value
32 *
33 * @param Pattern $value Property value
34 *
35 * @return $this
36 */
37 public function setValue($value)
38 {
39 $this->assertType($value, "Pattern");
40 $this->value = $value;
41 return $this;
42 }
43
44 /**
45 * Sets the property kind that is one of the kind constants
46 *
47 * @param string $kind Property kind
48 *
49 * @return $this
50 *
51 * @codeCoverageIgnore
52 */
53 public function setKind($kind)
54 {
55 return $this;
56 }
57
58 /**
59 * Sets the property method flag that is true when the property is a method
60 *
61 * @param bool $method Method flag
62 *
63 * @return $this
64 *
65 * @codeCoverageIgnore
66 */
67 public function setMethod($method)
68 {
69 return $this;
70 }
71 }