| 1 | <?php |
||
| 8 | class JArray extends ArrayObject |
||
| 9 | { |
||
| 10 | use Javascript; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * value. |
||
| 14 | * |
||
| 15 | * @return array |
||
| 16 | */ |
||
| 17 | public function value() |
||
| 21 | |||
| 22 | /** |
||
| 23 | * factory. |
||
| 24 | * @param array $subject |
||
| 25 | * @return static |
||
| 26 | */ |
||
| 27 | public static function factory($subject = []) |
||
| 31 | |||
| 32 | /** |
||
| 33 | * supports. |
||
| 34 | * @param static|array $object |
||
| 35 | * @return bool |
||
| 36 | */ |
||
| 37 | 1 | public static function supports($object) |
|
| 45 | } |
||
| 46 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: