Passed
Push — master ( e5878d...3c0c31 )
by y
01:52
created
src/Task/FieldEntries.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     protected $types = [];
51 51
 
52
-    public function __construct (Task $task, array $data = []) {
52
+    public function __construct(Task $task, array $data = []) {
53 53
         $this->task = $task;
54 54
         parent::__construct($task, $data);
55 55
     }
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      * @param string $i
59 59
      * @param array $data
60 60
      */
61
-    protected function _setMapped (string $i, $data): void {
61
+    protected function _setMapped(string $i, $data): void {
62 62
         /** @var FieldEntry $entry */
63 63
         $entry = $this->api->factory($this, FieldEntry::class, $data);
64 64
         $gid = $entry->getGid();
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      * @param $offset
73 73
      * @return null|string
74 74
      */
75
-    protected function _toGid (string $offset) {
75
+    protected function _toGid(string $offset) {
76 76
         if (isset($this->names[$offset])) {
77 77
             return $offset;
78 78
         }
@@ -82,11 +82,11 @@  discard block
 block discarded – undo
82 82
     /**
83 83
      * @return int
84 84
      */
85
-    public function count () {
85
+    public function count() {
86 86
         return count($this->data);
87 87
     }
88 88
 
89
-    public function getDiff (): array {
89
+    public function getDiff(): array {
90 90
         return array_map(function(FieldEntry $value) {
91 91
             return $value->getValue();
92 92
         }, array_intersect_key($this->data, $this->diff));
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
      * @param $fieldGid
97 97
      * @return FieldEntry
98 98
      */
99
-    public function getField ($fieldGid) {
99
+    public function getField($fieldGid) {
100 100
         return $this->data[$fieldGid];
101 101
     }
102 102
 
@@ -104,41 +104,41 @@  discard block
 block discarded – undo
104 104
      * @param string $name
105 105
      * @return string
106 106
      */
107
-    public function getGid (string $name): string {
107
+    public function getGid(string $name): string {
108 108
         return $this->gids[$name];
109 109
     }
110 110
 
111 111
     /**
112 112
      * @return string[]
113 113
      */
114
-    public function getGids () {
114
+    public function getGids() {
115 115
         return $this->gids;
116 116
     }
117 117
 
118 118
     /**
119 119
      * @return Generator
120 120
      */
121
-    public function getIterator () {
121
+    public function getIterator() {
122 122
         foreach ($this->data as $gid => $field) {
123 123
             yield $gid => $field->getValue();
124 124
         }
125 125
     }
126 126
 
127
-    public function getName (string $fieldGid) {
127
+    public function getName(string $fieldGid) {
128 128
         return $this->names[$fieldGid];
129 129
     }
130 130
 
131 131
     /**
132 132
      * @return string[]
133 133
      */
134
-    public function getNames () {
134
+    public function getNames() {
135 135
         return $this->names;
136 136
     }
137 137
 
138 138
     /**
139 139
      * @return array
140 140
      */
141
-    public function getValues () {
141
+    public function getValues() {
142 142
         return iterator_to_array($this);
143 143
     }
144 144
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
      * @param string $offset
147 147
      * @return bool
148 148
      */
149
-    public function offsetExists ($offset) {
149
+    public function offsetExists($offset) {
150 150
         return isset($this->data[$this->_toGid($offset)]);
151 151
     }
152 152
 
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
      * @param string $offset
155 155
      * @return null|number|string
156 156
      */
157
-    public function offsetGet ($offset) {
157
+    public function offsetGet($offset) {
158 158
         return $this->data[$this->_toGid($offset)]->getValue();
159 159
     }
160 160
 
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
      * @param string $offset
163 163
      * @param null|number|string $value
164 164
      */
165
-    public function offsetSet ($offset, $value) {
165
+    public function offsetSet($offset, $value) {
166 166
         $offset = $this->_toGid($offset);
167 167
         $this->data[$offset]->setValue($value);
168 168
         $this->diff[$offset] = true;
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
      *
175 175
      * @param string $offset
176 176
      */
177
-    public function offsetUnset ($offset) {
177
+    public function offsetUnset($offset) {
178 178
         $this->offsetSet($offset, null);
179 179
     }
180 180
 
Please login to merge, or discard this patch.