Completed
Push — master ( d65f6c...825ddc )
by Nicolaas
03:31
created

OrderProcessQueue::AddOrderToQueue()   A

Complexity

Conditions 3
Paths 2

Size

Total Lines 17
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
dl 0
loc 17
rs 9.4285
c 0
b 0
f 0
eloc 12
nc 2
nop 2
1
<?php
2
/**
3
 * This class provides a bunch of Meta Objects
4
 * that do not interact with the object at hand, but rather with the datalist as a whole.
5
 *
6
 */
7
8
class OrderProcessQueue extends DataObject
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
9
{
10
    private static $db = array(
0 ignored issues
show
Unused Code introduced by
The property $db is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
11
        'DeferTimeInSeconds' => 'Int',
12
        'InProcess' => 'Boolean'
13
    );
14
15
    private static $has_one = array(
0 ignored issues
show
Unused Code introduced by
The property $has_one is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
16
        'Order' => 'Order'
17
    );
18
19
    private static $indexes = array(
0 ignored issues
show
Unused Code introduced by
The property $indexes is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
20
        'OrderID' => array(
21
            'type' => 'unique',
22
            'value' => '"OrderID"'
23
        ),
24
        'Created' => true,
25
        'DeferTimeInSeconds' => true
26
    );
27
28
    private static $casting = array(
0 ignored issues
show
Unused Code introduced by
The property $casting is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
29
        'ToBeProcessedAt' => 'SS_Datetime'
30
    );
31
32
    private static $default_sort = array(
0 ignored issues
show
Unused Code introduced by
The property $default_sort is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
33
        'Created' => 'DESC'
34
    );
35
36
    /**
37
     * standard SS variable.
38
     *
39
     * @var array
40
     */
41
    private static $summary_fields = array(
0 ignored issues
show
Unused Code introduced by
The property $summary_fields is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
42
        'Order.Title' => 'Order',
43
        'Order.Status.Title' => 'Current Step',
44
        'ToBeProcessedAt.Nice' => 'To be processed at',
45
        'ToBeProcessedAt.Ago' => 'That is ...',
46
        'InProcess.Nice' => 'Currently Running'
47
    );
48
49
    /**
50
     * standard SS variable.
51
     *
52
     * @var array
53
     */
54
    private static $searchable_fields = array(
0 ignored issues
show
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
Unused Code introduced by
The property $searchable_fields is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
55
        'OrderID' => array(
56
            'field' => 'NumericField',
57
            'title' => 'Order Number',
58
        )
59
    );
60
61
62
    /**
63
     * Standard SS method.
64
     *
65
     * @param Member $member
0 ignored issues
show
Documentation introduced by
Should the type for parameter $member not be Member|null?

This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.

It makes a suggestion as to what type it considers more descriptive.

Most often this is a case of a parameter that can be null in addition to its declared types.

Loading history...
66
     *
67
     * @return bool
68
     */
69
    public function canCreate($member = null)
70
    {
71
        return false;
72
    }
73
74
    /**
75
     * Standard SS method.
76
     *
77
     * @param Member $member
0 ignored issues
show
Documentation introduced by
Should the type for parameter $member not be Member|null?

This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.

It makes a suggestion as to what type it considers more descriptive.

Most often this is a case of a parameter that can be null in addition to its declared types.

Loading history...
78
     *
79
     * @return bool
0 ignored issues
show
Documentation introduced by
Should the return type not be boolean|string|null?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
80
     */
81
    public function canView($member = null)
82
    {
83
        if (! $member) {
84
            $member = Member::currentUser();
85
        }
86
        $extended = $this->extendedCan(__FUNCTION__, $member);
0 ignored issues
show
Documentation introduced by
$member is of type object<DataObject>|null, but the function expects a object<Member>|integer.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
87
        if ($extended !== null) {
88
            return $extended;
89
        }
90
        if (Permission::checkMember($member, Config::inst()->get('EcommerceRole', 'admin_permission_code'))) {
91
            return true;
92
        }
93
        //is the member is a shop assistant they can always view it
94
        if (EcommerceRole::current_member_is_shop_assistant($member)) {
95
            return true;
96
        }
97
98
        return parent::canView($member);
0 ignored issues
show
Bug introduced by
It seems like $member defined by \Member::currentUser() on line 84 can also be of type object<DataObject>; however, DataObject::canView() does only seem to accept object<Member>|null, maybe add an additional type check?

If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:

/**
 * @return array|string
 */
function returnsDifferentValues($x) {
    if ($x) {
        return 'foo';
    }

    return array();
}

$x = returnsDifferentValues($y);
if (is_array($x)) {
    // $x is an array.
}

If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.

Loading history...
99
    }
100
101
    /**
102
     * Standard SS method.
103
     *
104
     * @param Member $member
0 ignored issues
show
Documentation introduced by
Should the type for parameter $member not be Member|null?

This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.

It makes a suggestion as to what type it considers more descriptive.

Most often this is a case of a parameter that can be null in addition to its declared types.

Loading history...
105
     *
106
     * @return bool
107
     */
108
    public function canEdit($member = null)
109
    {
110
        return false;
111
    }
112
113
    /**
114
     * Standard SS method
115
     * Queues can be deleted if needed.
116
     *
117
     * @param Member $member
0 ignored issues
show
Documentation introduced by
Should the type for parameter $member not be Member|null?

This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.

It makes a suggestion as to what type it considers more descriptive.

Most often this is a case of a parameter that can be null in addition to its declared types.

Loading history...
118
     *
119
     * @return bool
0 ignored issues
show
Documentation introduced by
Should the return type not be boolean|string|null?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
120
     */
121
    public function canDelete($member = null)
122
    {
123
        return parent::canDelete($member);
124
    }
125
126
    /**
127
     * standard SS variable.
128
     *
129
     * @var string
130
     */
131
    private static $singular_name = 'Order To Be Processed';
0 ignored issues
show
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
Unused Code introduced by
The property $singular_name is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
132
    public function i18n_singular_name()
133
    {
134
        return _t('OrderProcessQueue.SINGULAR_NAME', 'Order In Queue');
135
    }
136
137
    /**
138
     * standard SS variable.
139
     *
140
     * @var string
141
     */
142
    private static $plural_name = 'Orders to be Processed';
0 ignored issues
show
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
Unused Code introduced by
The property $plural_name is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
143
    public function i18n_plural_name()
144
    {
145
        return _t('OrderProcessQueue.PLURAL_NAME', 'Orders In Queue');
146
    }
147
148
149
    /**
150
     * META METHOD: Add an order to the job list.
151
     * If the order already exists, it will update the seconds and the creation  time.
152
     *
153
     * @param Order $order          [description]
154
     * @param Int   $deferInSeconds [description]
0 ignored issues
show
Bug introduced by
There is no parameter named $deferInSeconds. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
155
     */
156
    public function AddOrderToQueue($order, $deferTimeInSeconds)
157
    {
158
        $filter = array('OrderID' => $order->ID);
159
        $existingEntry = OrderProcessQueue::get()->filter($filter)->first();
160
        $filter['Created'] = SS_Datetime::now()->Rfc2822();
161
        $filter['DeferTimeInSeconds'] = $deferTimeInSeconds;
162
        if (! $existingEntry) {
163
            $existingEntry = OrderProcessQueue::create($filter);
164
        } else {
165
            foreach ($filter as $field => $value) {
166
                $existingEntry->$field = $value;
167
            }
168
        }
169
        $existingEntry->write();
170
171
        return $existingEntry;
172
    }
173
174
    /**
175
     * processes the order ...
176
     *
177
     * @param  Order $order
178
     */
179
    public function process($order)
180
    {
181
        $queueObjectSingleton = Injector::inst()->get('OrderProcessQueue');
182
        $myQueueObject = $queueObjectSingleton->getQueueObject($order);
183
        if ($myQueueObject && $myQueueObject->isReadyToGo()) {
184
            $oldOrderStatusID = $order->StatusID;
0 ignored issues
show
Documentation introduced by
The property StatusID does not exist on object<Order>. Since you implemented __set, maybe consider adding a @property annotation.

Since your code implements the magic setter _set, this function will be called for any write access on an undefined variable. You can add the @property annotation to your class or interface to document the existence of this variable.

<?php

/**
 * @property int $x
 * @property int $y
 * @property string $text
 */
class MyLabel
{
    private $properties;

    private $allowedProperties = array('x', 'y', 'text');

    public function __get($name)
    {
        if (isset($properties[$name]) && in_array($name, $this->allowedProperties)) {
            return $properties[$name];
        } else {
            return null;
        }
    }

    public function __set($name, $value)
    {
        if (in_array($name, $this->allowedProperties)) {
            $properties[$name] = $value;
        } else {
            throw new \LogicException("Property $name is not defined.");
        }
    }

}

Since the property has write access only, you can use the @property-write annotation instead.

Of course, you may also just have mistyped another name, in which case you should fix the error.

See also the PhpDoc documentation for @property.

Loading history...
185
            $myQueueObject->InProcess = true;
186
            $myQueueObject->write();
187
            $order->tryToFinaliseOrder(
188
                $tryAgain = false,
189
                $fromOrderQueue = true
190
            );
191
            $newOrderStatusID = $order->StatusID;
0 ignored issues
show
Documentation introduced by
The property StatusID does not exist on object<Order>. Since you implemented __set, maybe consider adding a @property annotation.

Since your code implements the magic setter _set, this function will be called for any write access on an undefined variable. You can add the @property annotation to your class or interface to document the existence of this variable.

<?php

/**
 * @property int $x
 * @property int $y
 * @property string $text
 */
class MyLabel
{
    private $properties;

    private $allowedProperties = array('x', 'y', 'text');

    public function __get($name)
    {
        if (isset($properties[$name]) && in_array($name, $this->allowedProperties)) {
            return $properties[$name];
        } else {
            return null;
        }
    }

    public function __set($name, $value)
    {
        if (in_array($name, $this->allowedProperties)) {
            $properties[$name] = $value;
        } else {
            throw new \LogicException("Property $name is not defined.");
        }
    }

}

Since the property has write access only, you can use the @property-write annotation instead.

Of course, you may also just have mistyped another name, in which case you should fix the error.

See also the PhpDoc documentation for @property.

Loading history...
192
            if($oldOrderStatusID != $newOrderStatusID) {
193
                $myQueueObject->delete();
194
            } else {
195
                $myQueueObject->InProcess = false;
196
                $myQueueObject->write();
197
            }
198
        }
199
    }
200
201
    /**
202
     * META METHOD: returns the queue object if it exists
203
     *
204
     * @param  Order $order
205
     *
206
     * @return null |   OrderProcessQueue
0 ignored issues
show
Documentation introduced by
Should the return type not be DataObject|null?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
207
     */
208
    public function getQueueObject($order)
209
    {
210
        $filter = array('OrderID' => $order->ID);
211
212
        return OrderProcessQueue::get()->filter($filter)->first();
213
    }
214
215
    /**
216
     * META METHOD: Once you are done, you can remove the item like this ...
217
     *
218
     * @param  Order $order
219
     */
220
    public function removeOrderFromQueue($order)
221
    {
222
        $filter = array('OrderID' => $order->ID);
223
        $existingEntries = OrderProcessQueue::get()->filter($filter);
224
        foreach($existingEntries as $existingEntry) {
225
            $existingEntry->delete();
226
        }
227
    }
228
229
    /**
230
     * META METHOD: returns a list of orders to be processed
231
     * @param int $id force this Order to be processed
232
     * @param int $limit total number of orders that can be retrieved at any one time
233
     *
234
     * @return DataList (of orders)
235
     */
236
    public function OrdersToBeProcessed($id = 0, $limit = 9999)
237
    {
238
239
        //we sort the order randomly so that we get a nice mixture
240
        //not always the same ones holding up the process
241
        $sql = '
242
            SELECT "OrderID"
243
            FROM "OrderProcessQueue"
244
            WHERE
245
                "InProcess" = 0
246
                AND
247
                (UNIX_TIMESTAMP("Created") + "DeferTimeInSeconds") < '.time().'
248
            ORDER BY RAND() DESC
249
            LIMIT '.$limit.';
250
        ';
251
        $rows = DB::query($sql);
252
        $orderIDs = array($id => $id);
253
        foreach ($rows as $row) {
254
            $orderIDs[$row['OrderID']] = $row['OrderID'];
255
        }
256
257
        return Order::get()
258
            ->filter(array('ID' => $orderIDs))
259
            ->sort('RAND()');
260
    }
261
262
    /**
263
     * META METHOD: all orders with a queue object
264
     * @param int $id force this Order to be processed
0 ignored issues
show
Bug introduced by
There is no parameter named $id. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
265
     * @param int $limit total number of orders that can be retrieved at any one time
266
     *
267
     * @return DataList (of orders)
268
     */
269
    public function AllOrdersInQueue($limit = 9999)
270
    {
271
272
        return Order::get()
273
            ->filter(array('ID' => OrderProcessQueue::get()->column('OrderID')))
274
            ->sort('RAND()')
275
            ->limit($limit);
276
    }
277
278
    /**
279
     * META METHOD: returns a list of orders NOT YET to be processed
280
     * @param int $limit total number of orders that can be retrieved at any one time
281
     *
282
     * @return DataList (of orders)
283
     */
284
    public function OrdersInQueueThatAreNotReady($limit = 9999)
285
    {
286
287
        //we sort the order randomly so that we get a nice mixture
288
        //not always the same ones holding up the process
289
        $sql = '
290
            SELECT "OrderID"
291
            FROM "OrderProcessQueue"
292
            WHERE
293
                (UNIX_TIMESTAMP("Created") + "DeferTimeInSeconds") >= '.time().'
294
            ORDER BY RAND() DESC
295
            LIMIT '.$limit.';
296
        ';
297
        $rows = DB::query($sql);
298
        $orderIDs = array(0 => 0);
299
        foreach ($rows as $row) {
300
            $orderIDs[$row['OrderID']] = $row['OrderID'];
301
        }
302
303
        return Order::get()
304
            ->filter(array('ID' => $orderIDs))
305
            ->sort('RAND()');
306
    }
307
308
    /**
309
     * non-database method of working out if an Order is ready to go.
310
     *
311
     * @return bool
312
     */
313
    public function isReadyToGo()
314
    {
315
        return (strtotime($this->Created) + $this->DeferTimeInSeconds) < time();
0 ignored issues
show
Documentation introduced by
The property DeferTimeInSeconds does not exist on object<OrderProcessQueue>. Since you implemented __get, maybe consider adding a @property annotation.

Since your code implements the magic getter _get, this function will be called for any read access on an undefined variable. You can add the @property annotation to your class or interface to document the existence of this variable.

<?php

/**
 * @property int $x
 * @property int $y
 * @property string $text
 */
class MyLabel
{
    private $properties;

    private $allowedProperties = array('x', 'y', 'text');

    public function __get($name)
    {
        if (isset($properties[$name]) && in_array($name, $this->allowedProperties)) {
            return $properties[$name];
        } else {
            return null;
        }
    }

    public function __set($name, $value)
    {
        if (in_array($name, $this->allowedProperties)) {
            $properties[$name] = $value;
        } else {
            throw new \LogicException("Property $name is not defined.");
        }
    }

}

If the property has read access only, you can use the @property-read annotation instead.

Of course, you may also just have mistyped another name, in which case you should fix the error.

See also the PhpDoc documentation for @property.

Loading history...
316
    }
317
318
    /**
319
     *
320
     * casted variable
321
     * @return SS_DateTime
322
     */
323
    public function ToBeProcessedAt()
324
    {
325
        return $this->getToBeProcessedAt();
326
    }
327
328
    /**
329
     *
330
     * casted variable
331
     * @return SS_DateTime
332
     */
333
    public function getToBeProcessedAt()
334
    {
335
        return DBField::create_field('SS_Datetime', (strtotime($this->Created) + $this->DeferTimeInSeconds));
0 ignored issues
show
Documentation introduced by
The property DeferTimeInSeconds does not exist on object<OrderProcessQueue>. Since you implemented __get, maybe consider adding a @property annotation.

Since your code implements the magic getter _get, this function will be called for any read access on an undefined variable. You can add the @property annotation to your class or interface to document the existence of this variable.

<?php

/**
 * @property int $x
 * @property int $y
 * @property string $text
 */
class MyLabel
{
    private $properties;

    private $allowedProperties = array('x', 'y', 'text');

    public function __get($name)
    {
        if (isset($properties[$name]) && in_array($name, $this->allowedProperties)) {
            return $properties[$name];
        } else {
            return null;
        }
    }

    public function __set($name, $value)
    {
        if (in_array($name, $this->allowedProperties)) {
            $properties[$name] = $value;
        } else {
            throw new \LogicException("Property $name is not defined.");
        }
    }

}

If the property has read access only, you can use the @property-read annotation instead.

Of course, you may also just have mistyped another name, in which case you should fix the error.

See also the PhpDoc documentation for @property.

Loading history...
336
    }
337
338
339
    /**
340
     * CMS Fields
341
     * @return FieldList
342
     */
343
    public function getCMSFields()
344
    {
345
        $fields = parent::getCMSFields();
346
        if($this->exists()) {
347
            $fields->addFieldToTab(
348
                'Root.Main',
349
                ReadonlyField::create(
350
                    'ToBeProcessedAtCompilations',
351
                    _t('OrderProcessQueue.TO_BE_PROCESSED', 'To Be Processed'),
352
                    $this->ToBeProcessedAt->Nice() . ' - ' . $this->getToBeProcessedAt()->Ago()
0 ignored issues
show
Documentation introduced by
The property ToBeProcessedAt does not exist on object<OrderProcessQueue>. Since you implemented __get, maybe consider adding a @property annotation.

Since your code implements the magic getter _get, this function will be called for any read access on an undefined variable. You can add the @property annotation to your class or interface to document the existence of this variable.

<?php

/**
 * @property int $x
 * @property int $y
 * @property string $text
 */
class MyLabel
{
    private $properties;

    private $allowedProperties = array('x', 'y', 'text');

    public function __get($name)
    {
        if (isset($properties[$name]) && in_array($name, $this->allowedProperties)) {
            return $properties[$name];
        } else {
            return null;
        }
    }

    public function __set($name, $value)
    {
        if (in_array($name, $this->allowedProperties)) {
            $properties[$name] = $value;
        } else {
            throw new \LogicException("Property $name is not defined.");
        }
    }

}

If the property has read access only, you can use the @property-read annotation instead.

Of course, you may also just have mistyped another name, in which case you should fix the error.

See also the PhpDoc documentation for @property.

Loading history...
353
                ),
354
                'InProcess'
355
            );
356
            $fields->addFieldToTab(
357
                'Root.Main',
358
                LiteralField::create(
359
                    'processQueueNow',
360
                    '<h2>
361
                        <a href="/dev/tasks/EcommerceTaskProcessOrderQueue/?id='.$this->OrderID.'" target="_blank">'.
0 ignored issues
show
Documentation introduced by
The property OrderID does not exist on object<OrderProcessQueue>. Since you implemented __get, maybe consider adding a @property annotation.

Since your code implements the magic getter _get, this function will be called for any read access on an undefined variable. You can add the @property annotation to your class or interface to document the existence of this variable.

<?php

/**
 * @property int $x
 * @property int $y
 * @property string $text
 */
class MyLabel
{
    private $properties;

    private $allowedProperties = array('x', 'y', 'text');

    public function __get($name)
    {
        if (isset($properties[$name]) && in_array($name, $this->allowedProperties)) {
            return $properties[$name];
        } else {
            return null;
        }
    }

    public function __set($name, $value)
    {
        if (in_array($name, $this->allowedProperties)) {
            $properties[$name] = $value;
        } else {
            throw new \LogicException("Property $name is not defined.");
        }
    }

}

If the property has read access only, you can use the @property-read annotation instead.

Of course, you may also just have mistyped another name, in which case you should fix the error.

See also the PhpDoc documentation for @property.

Loading history...
362
                            _t('OrderProcessQueue.PROCESS', 'Process now').
363
                        '</a>
364
                    </h2>'
365
                )
366
            );
367
            $fields->replaceField(
368
                'OrderID',
369
                CMSEditLinkField::create(
370
                    'OrderID',
371
                    'Order',
372
                    $this->Order()
0 ignored issues
show
Documentation Bug introduced by
The method Order does not exist on object<OrderProcessQueue>? Since you implemented __call, maybe consider adding a @method annotation.

If you implement __call and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.

This is often the case, when __call is implemented by a parent class and only the child class knows which methods exist:

class ParentClass {
    private $data = array();

    public function __call($method, array $args) {
        if (0 === strpos($method, 'get')) {
            return $this->data[strtolower(substr($method, 3))];
        }

        throw new \LogicException(sprintf('Unsupported method: %s', $method));
    }
}

/**
 * If this class knows which fields exist, you can specify the methods here:
 *
 * @method string getName()
 */
class SomeClass extends ParentClass { }
Loading history...
373
                )
374
            );
375
        }
376
        return $fields;
377
    }
378
}
379