PHPDoc type hinting for array of objects?
Asked Answered
A

15

463

So, in PHPDoc one can specify @var above the member variable declaration to hint at its type. Then an IDE, for ex. PHPEd, will know what type of object it's working with and will be able to provide a code insight for that variable.

<?php
  class Test
  {
    /** @var SomeObj */
    private $someObjInstance;
  }
?>

This works great until I need to do the same to an array of objects to be able to get a proper hint when I iterate through those objects later on.

So, is there a way to declare a PHPDoc tag to specify that the member variable is an array of SomeObjs? @var array is not enough, and @var array(SomeObj) doesn't seem to be valid, for example.

Albite answered 22/4, 2009 at 18:29 Comment(2)
There's some reference in this Netbeans 6.8 dev blog that the IDE is now smart enough to deduce the type of array members: blogs.sun.com/netbeansphp/entry/php_templates_improvedSacaton
@therefromhere: your link is broken. I think the new URL is: blogs.oracle.com/netbeansphp/entry/php_templates_improvedCowley
W
385

Use:

/* @var $objs Test[] */
foreach ($objs as $obj) {
    // Typehinting will occur after typing $obj->
}

when typehinting inline variables, and

class A {
    /** @var Test[] */
    private $items;
}

for class properties.

Previous answer from '09 when PHPDoc (and IDEs like Zend Studio and Netbeans) didn't have that option:

The best you can do is say,

foreach ($Objs as $Obj)
{
    /* @var $Obj Test */
    // You should be able to get hinting after the preceding line if you type $Obj->
}

I do that a lot in Zend Studio. Don't know about other editors, but it ought to work.

Workaday answered 22/4, 2009 at 19:28 Comment(13)
This makes sense but it didn't work for PHPEd 5.2. The only thing I was able to come up with that worked is foreach ($Objs as /** @var Test */$Obj), which is horribly ugly. :(Albite
This works in NetBeans 6.7 (I think it's bugged, since you get a ? for the type when you hit ctrl-space, but it is able autocomplete the object's members/methods).Sacaton
Works a treat in NetBeans 6.8+. $Obj-> then ctrl-space brings up the expect list of properties and methods.Exhibitive
Note in Netbeans 7, seems to be important you only have one asterisk — /** @var $Obj Test */ doesn't work.Tierell
@contrebis: The "@var" is a valid docblock tag. So even if your IDE do not support it within a docblock "/** ... /" and supports "@var" in "/ ...*/" only - please, please do not change your correct docblock. File an issue to the bug tracker of your IDE to make your IDE compliant to standards. Imagine your development team / external developers / community uses different IDEs. Keep it as it is and be prepared for the future.Cowley
@Cowley I'm not saying you're incorrect, but can you find a reference for this? I can only find documentation that describes @var as valid for describing class variables. I assumed that using @var elsewhere was a useful but non-standard extension, hence the single *.Tierell
This solves problem but it is not good for clean code. I think we have to remove /* @var $Obj Test */ after we finish our work. Do you agree with me?Libbylibeccio
As a note, this apparently doesn't work with abstract classes. So even though my array is ONLY guaranteed to be filled with subclasses of Foo, I have to use an example from one of the children to make it work.Chalcocite
It works for me, but why is the type written after the variable name? Usually it's the other way...Volding
/** @var TYPE $variable_name */ is the correct syntax; do not reverse the order of type and variable name (as suggested earlier in the comments) as that wont work in all cases.Eno
I have to agree with Thom Porter. Indeed, this syntax is supported by phpDocumentor. See phpdoc.org/docs/latest/guides/types.html#arrays and another topic on the same subject #9132562 !Adal
@var User[] is the answerSpaniel
@Workaday - How can we throw exceptions for type mismatch?Humfrid
K
947

In the PhpStorm IDE from JetBrains, you can use /** @var SomeObj[] */, e.g.:

/**
 * @return SomeObj[]
 */
function getSomeObjects() {...}

The phpdoc documentation recommends this method:

specified containing a single type, the Type definition informs the reader of the type of each array element. Only one Type is then expected as element for a given array.

Example: @return int[]

Keto answered 19/11, 2009 at 13:50 Comment(17)
I just downloaded and have been using phpstorm for the past week. Beats the heck out of Aptana (which is great for being free). This is exactly what I was looking for. Actually, it is the same way you'd do it for JavaScript, I should have guessedVambrace
This doesn't work in Netbeans, I am disappointed. Jetbrains make some very nice tools.Far
Thank you! I was trying to figure out the proper syntax in PhpStorm. Knew they would have something. I would have found array<SomeObj> more intuitive. But I guess that's from my C++/C# background (template vars).Maxwell
Can we make the annotation compatible with NetBeans using /** @var SomeObj[]|array */ ?Ramsgate
@Ramsgate @Keyo this works in Netbeans now (in 7.1 nightly build at least, maybe earlier), though it seems you need to use a temporary variable (a bug?). Hinting for foreach(getSomeObjects() as $obj) doesn't work, but it does for $objs = getSomeObjects(); foreach($objs as $obj)Sacaton
This is fully working in the latest nightly builds of Netbeans now, should be included in the 7.2 release.Sacaton
Works in NuSphere's PhpED.Vow
I have a program that builds out basic MVC files for me based on database structure, and from the start I had it including a doc-block comments on the view files for all of the variables defined. I just updated it to use this AWESOME format of @var Object[] $objects... I LOVE this! Thank you to the JetBrains team, and I thank you to SO for having all the right answers! =)Between
Would be nice to have @var Obj[string] for associative arrays.Unboned
Unfortunately Komodo IDE (as of 8.5) only partially supports it: the [] at the end of the hint makes no difference, komodo thinks that it returns that type (single object).Depositary
Should mention works in intellij ultimate too as well as phpstormCupulate
Note that you have to put it here: /** @var EditablePane[] $Panes / public $Panes; Not here: public /* var EditablePane[] $Panes */ $Panes;Zedoary
Works in PHP Tools for Visual Studio as well.Sportsmanship
Doesn't work for me in PhpStorm 8.0.3. If I have @return \namespace\Class[] in my docblock, it doesn't show up in the documentation popup (ctrl+q).Sunburst
You can also combine the [] and | syntaxes to indicate an array of mixed types: /** @var A[]|B[] $Obj */ will indicate $Obj is a mixed array of A and B instances, and when you iterate the array (foreach), PhpStorm (maybe others by now?) will show anything accessible from A and B for the current item. It's a bit confusing, considering the syntax implies an array of A OR an array of B, but it works.Cadel
For arrays that could contain multiple types, phpDocumentor indicates the syntax as (A|B)[], and is supported by PHPStorm.Infer
Sorry, I'm a stickler, people are saying PHPStorm is great, but of course for those working across multiple full stacks at once, such as php/laravel, ruby/rails, Java and Angular JS, IntelliJ is also so great with appropriate plugins installed ;) No need to tie up masses of ram with multiple IDEs such as phpstorm + rubymine + intelliJ etcValuation
W
385

Use:

/* @var $objs Test[] */
foreach ($objs as $obj) {
    // Typehinting will occur after typing $obj->
}

when typehinting inline variables, and

class A {
    /** @var Test[] */
    private $items;
}

for class properties.

Previous answer from '09 when PHPDoc (and IDEs like Zend Studio and Netbeans) didn't have that option:

The best you can do is say,

foreach ($Objs as $Obj)
{
    /* @var $Obj Test */
    // You should be able to get hinting after the preceding line if you type $Obj->
}

I do that a lot in Zend Studio. Don't know about other editors, but it ought to work.

Workaday answered 22/4, 2009 at 19:28 Comment(13)
This makes sense but it didn't work for PHPEd 5.2. The only thing I was able to come up with that worked is foreach ($Objs as /** @var Test */$Obj), which is horribly ugly. :(Albite
This works in NetBeans 6.7 (I think it's bugged, since you get a ? for the type when you hit ctrl-space, but it is able autocomplete the object's members/methods).Sacaton
Works a treat in NetBeans 6.8+. $Obj-> then ctrl-space brings up the expect list of properties and methods.Exhibitive
Note in Netbeans 7, seems to be important you only have one asterisk — /** @var $Obj Test */ doesn't work.Tierell
@contrebis: The "@var" is a valid docblock tag. So even if your IDE do not support it within a docblock "/** ... /" and supports "@var" in "/ ...*/" only - please, please do not change your correct docblock. File an issue to the bug tracker of your IDE to make your IDE compliant to standards. Imagine your development team / external developers / community uses different IDEs. Keep it as it is and be prepared for the future.Cowley
@Cowley I'm not saying you're incorrect, but can you find a reference for this? I can only find documentation that describes @var as valid for describing class variables. I assumed that using @var elsewhere was a useful but non-standard extension, hence the single *.Tierell
This solves problem but it is not good for clean code. I think we have to remove /* @var $Obj Test */ after we finish our work. Do you agree with me?Libbylibeccio
As a note, this apparently doesn't work with abstract classes. So even though my array is ONLY guaranteed to be filled with subclasses of Foo, I have to use an example from one of the children to make it work.Chalcocite
It works for me, but why is the type written after the variable name? Usually it's the other way...Volding
/** @var TYPE $variable_name */ is the correct syntax; do not reverse the order of type and variable name (as suggested earlier in the comments) as that wont work in all cases.Eno
I have to agree with Thom Porter. Indeed, this syntax is supported by phpDocumentor. See phpdoc.org/docs/latest/guides/types.html#arrays and another topic on the same subject #9132562 !Adal
@var User[] is the answerSpaniel
@Workaday - How can we throw exceptions for type mismatch?Humfrid
A
62

Netbeans hints:

You get code completion on $users[0]-> and for $this-> for an array of User classes.

/**
 * @var User[]
 */
var $users = array();

You also can see the type of the array in a list of class members when you do completion of $this->...

Aesthetic answered 2/5, 2015 at 6:38 Comment(4)
works in PhpStorm 9 EAP as well: /** * @var UserInterface[] */ var $users = []; // Array of Objs implementing an InterfaceInfrangible
I've tried it in NetBeans IDE 8.0.2, but it I get suggestions from class I'm currently in.Cierracig
also works in Eclipse 4.6.3 (idk what version support was introduced, but its working, and its what i'm using now)Haler
This unfortunately doesn't work after using array_pop() or similar functions for some reason. Seems that Netbeans doesn't realize those functions return a single element of the input array.Ozone
T
35

PSR-5: PHPDoc proposes a form of Generics-style notation.

Syntax

Type[]
Type<Type>
Type<Type[, Type]...>
Type<Type[|Type]...>

Values in a Collection MAY even be another array and even another Collection.

Type<Type<Type>>
Type<Type<Type[, Type]...>>
Type<Type<Type[|Type]...>>

Examples

<?php

$x = [new Name()];
/* @var $x Name[] */

$y = new Collection([new Name()]);
/* @var $y Collection<Name> */

$a = new Collection(); 
$a[] = new Model_User(); 
$a->resetChanges(); 
$a[0]->name = "George"; 
$a->echoChanges();
/* @var $a Collection<Model_User> */

Note: If you are expecting an IDE to do code assist then it's another question about if the IDE supports PHPDoc Generic-style collections notation.

From my answer to this question.

Threnode answered 9/9, 2016 at 0:2 Comment(1)
Generic notation was removed from PSR-5Reprimand
R
32

To specify a variable is an array of objects:

$needles = getAllNeedles();
/* @var $needles Needle[] */
$needles[1]->...                        //codehinting works

This works in Netbeans 7.2 (I'm using it)

Works also with:

$needles = getAllNeedles();
/* @var $needles Needle[] */
foreach ($needles as $needle) {
    $needle->...                        //codehinting works
}

Therefore use of declaration inside the foreach is not necessary.

Rrhoea answered 1/1, 2013 at 13:16 Comment(5)
This solution is cleaner than the accepted answer in my view, because you can use foreach multiple times and the type hinting will continue to work with out a new /* @var $Obj Test */ annotation each time.Iinde
I see two issues here: 1. proper phpdoc starts with /** 2. The correct format is @var <data-type> <variable-name>Territorial
@Territorial 1: the main question isn't phpdoc but typehinting 2: the correct format is not like you say, even according to other answers. In fact, I see 2 issues with your comment, and I'm wondering why you dint make your own answer with the correct formatRrhoea
1. Typehinting works with phpdoc...if you don't use the docblock, your IDE will not try guessing what you wrote in some random comment. 2. The correct format, as some other answers also said is what I specified above; data type before variable name. 3. I didn't write another answer because the question doesn't need another one and I'd rather not just edit your code.Territorial
While this works, the autocomplete (type /**<space> and it will expand to include the next variable name) expects the type before the variable name, so /** @var Needle[] $needles */ (PHPStorm 2021.1)Gaillard
C
11

I prefer to read and write clean code - as outlined in "Clean Code" by Robert C. Martin. When following his credo you should not require the developer (as user of your API) to know the (internal) structure of your array.

The API user may ask: Is that an array with one dimension only? Are the objects spread around on all levels of a multi dimensional array? How many nested loops (foreach, etc.) do i need to access all objects? What type of objects are "stored" in that array?

As you outlined you want to use that array (which contains objects) as a one dimensional array.

As outlined by Nishi you can use:

/**
 * @return SomeObj[]
 */

for that.

But again: be aware - this is not a standard docblock notation. This notation was introduced by some IDE producers.

Okay, okay, as a developer you know that "[]" is tied to an array in PHP. But what do a "something[]" mean in normal PHP context? "[]" means: create new element within "something". The new element could be everything. But what you want to express is: array of objects with the same type and it´s exact type. As you can see, the IDE producer introduces a new context. A new context you had to learn. A new context other PHP developers had to learn (to understand your docblocks). Bad style (!).

Because your array do have one dimension you maybe want to call that "array of objects" a "list". Be aware that "list" has a very special meaning in other programming languages. It would be mutch better to call it "collection" for example.

Remember: you use a programming language that enables you all options of OOP. Use a class instead of an array and make your class traversable like an array. E.g.:

class orderCollection implements ArrayIterator

Or if you want to store the internal objects on different levels within an multi dimensional array/object structure:

class orderCollection implements RecursiveArrayIterator

This solution replaces your array by an object of type "orderCollection", but do not enable code completion within your IDE so far. Okay. Next step:

Implement the methods that are introduced by the interface with docblocks - particular:

/**
 * [...]
 * @return Order
 */
orderCollection::current()

/**
 * [...]
 * @return integer E.g. database identifier of the order
 */
orderCollection::key()

/**
 * [...]
 * @return Order
 */
orderCollection::offsetGet()

Do not forget to use type hinting for:

orderCollection::append(Order $order)
orderCollection::offsetSet(Order $order)

This solution stops introducing a lot of:

/** @var $key ... */
/** @var $value ... */

all over your code files (e.g. within loops), as Zahymaka confirmed with her/his answer. Your API user is not forced to introduce that docblocks, to have code completion. To have @return on only one place reduces the redundancy (@var) as mutch as possible. Sprinkle "docBlocks with @var" would make your code worst readable.

Finaly you are done. Looks hard to achive? Looks like taking a sledgehammer to crack a nut? Not realy, since you are familiar with that interfaces and with clean code. Remember: your source code is written once / read many.

If code completion of your IDE do not work with this approach, switch to a better one (e.g. IntelliJ IDEA, PhpStorm, Netbeans) or file a feature request on the issue tracker of your IDE producer.

Thanks to Christian Weiss (from Germany) for being my trainer and for teaching me such a great stuff. PS: Meet me and him on XING.

Cowley answered 16/10, 2012 at 23:32 Comment(5)
this looks like the "right" way, but i cant get it to work with Netbeans. Made a little example: imgur.com/fJ9QsroMelamie
Maybe in 2012 this was "not a standard", but now it is described as built-in functionality of phpDoc.Concision
@Concision it looks like phpDocumentor adds this to its manual as a reaction to the ide producers. Even if you have a wide tool support it do not mean that it is best practice. It starts to get SomeObj[] spread around in more and more projects, similar to require, require_once, include and include_once did years ago. With autoloading the appearance of that statements drops below 5%. Hopefully SomeObj[] drops to the same rate within the next 2 years in favor to the approach above.Cowley
I don't understand why? This is very simple and clear notation. When you see SomeObj[] you know it's an two-dimensional array of SomeObj instances and then you know what to do with it. I don't think it does not follow "clean code" credo.Concision
This should be the answer. Not all IDE support approach with @return <className> for current() and all guys, though. PhpStorm supports so it helped me a lot. Thanks mate!Saluki
K
11

If you use PHPStorm 2021.2+ and VS Code with the PHP Intelephense extension you also can use this syntax (Array shapes):

@property array{name: string, content: string}[] $files

or

@var array{name: string, content: string}[] $files
Kilocalorie answered 17/11, 2021 at 13:0 Comment(0)
W
6

In NetBeans 7.0 (may be lower too) you could declare the the return type "array with Text objects " just as @return Text and the code hinting will work:

Edit: updated the example with @Bob Fanger suggestion

/**
 * get all Tests
 *
 * @return Test|Array $tests
 */
public function getAllTexts(){
    return array(new Test(), new Test());
}

and just use it:

$tests =  $controller->getAllTests();
//$tests->         //codehinting works!
//$tests[0]->      //codehinting works!

foreach($tests as $text){
    //$test->      //codehinting works!
}

It is not perfect but it is better then just to leave it just "mixed", which brings no value.

CONS is you are allowed to tread the array as Text Object which will throw errors.

Whew answered 6/2, 2013 at 14:1 Comment(2)
I use "@return array|Test Some description." which triggers the same behavior but is a little more explanatory.Ronnyronsard
This is a workaround, not a solution. What you are saying here is "this function may return an object of type 'Test', OR an array". It however doesn't technically tell you anything about what might be in the array.Orthohydrogen
C
5

Use array[type] in Zend Studio.

In Zend Studio, array[MyClass] or array[int] or even array[array[MyClass]] work great.

Choreograph answered 14/4, 2014 at 23:18 Comment(0)
S
5

As DanielaWaranie mentioned in her answer - there is a way to specify the type of $item when you iterating over $items in $collectionObject: Add @return MyEntitiesClassName to current() and rest of the Iterator and ArrayAccess-methods which return values.

Boom! No need in /** @var SomeObj[] $collectionObj */ over foreach, and works right with collection object, no need to return collection with specific method described as @return SomeObj[].

I suspect not all IDE support it but it works perfectly fine in PhpStorm, which makes me happier.

Example:

class MyCollection implements Countable, Iterator, ArrayAccess {

    /**
     * @return User
     */
    public function current() {
        return $this->items[$this->cursor];
    }

    //... implement rest of the required `interface` methods and your custom
}

What useful i was going to add posting this answer

In my case current() and rest of interface-methods are implemented in Abstract-collection class and I do not know what kind of entities will eventually be stored in collection.

So here is the trick: Do not specify return type in abstract class, instead use PhpDoc instuction @method in description of specific collection class.

Example:

class User {

    function printLogin() {
        echo $this->login;
    }

}

abstract class MyCollection implements Countable, Iterator, ArrayAccess {

    protected $items = [];

    public function current() {
        return $this->items[$this->cursor];
    }

    //... implement rest of the required `interface` methods and your custom
    //... abstract methods which will be shared among child-classes
}

/**
 * @method User current()
 * ...rest of methods (for ArrayAccess) if needed
 */
class UserCollection extends MyCollection {

    function add(User $user) {
        $this->items[] = $user;
    }

    // User collection specific methods...

}

Now, usage of classes:

$collection = new UserCollection();
$collection->add(new User(1));
$collection->add(new User(2));
$collection->add(new User(3));

foreach ($collection as $user) {
    // IDE should `recognize` method `printLogin()` here!
    $user->printLogin();
}

Once again: I suspect not all IDE support it, but PhpStorm does. Try yours, post in comment the results!

Saluki answered 30/10, 2014 at 3:56 Comment(2)
Voucher for pushing it that far, but unfortunately I still can resolve myself to specialize a collection to replace good old java generic types.... yuck'Aphasic
Thank you. How can you typehint a static method?Kopaz
R
3

I know I'm late to the party, but I've been working on this problem recently. I hope someone sees this because the accepted answer, although correct, is not the best way you can do this. Not in PHPStorm at least, I haven't tested NetBeans though.

The best way involves extending the ArrayIterator class rather than using native array types. This allows you to type hint at a class-level rather than at an instance-level, meaning you only have to PHPDoc once, not throughout your code (which is not only messy and violates DRY, but can also be problematic when it comes to refactoring - PHPStorm has a habit of missing PHPDoc when refactoring)

See code below:

class MyObj
{
    private $val;
    public function __construct($val) { $this->val = $val; }
    public function getter() { return $this->val; }
}

/**
 * @method MyObj current()
 */
class MyObjCollection extends ArrayIterator
{
    public function __construct(Array $array = [])
    {
        foreach($array as $object)
        {
            if(!is_a($object, MyObj::class))
            {
                throw new Exception('Invalid object passed to ' . __METHOD__ . ', expected type ' . MyObj::class);
            }
        }
        parent::__construct($array);
    }

    public function echoContents()
    {
        foreach($this as $key => $myObj)
        {
            echo $key . ': ' . $myObj->getter() . '<br>';
        }
    }
}

$myObjCollection = new MyObjCollection([
    new MyObj(1),
    new MyObj('foo'),
    new MyObj('blah'),
    new MyObj(23),
    new MyObj(array())
]);

$myObjCollection->echoContents();

The key here is the PHPDoc @method MyObj current() overriding the return type inherited from ArrayIterator (which is mixed). The inclusion of this PHPDoc means that when we iterate over the class properties using foreach($this as $myObj), we then get code completion when referring to the variable $myObj->...

To me, this is the neatest way to achieve this (at least until PHP introduces Typed Arrays, if they ever do), as we're declaring the iterator type in the iterable class, not on instances of the class scattered throughout the code.

I haven't shown here the complete solution for extending ArrayIterator, so if you use this technique, you may also want to:

  • Include other class-level PHPDoc as required, for methods such as offsetGet($index) and next()
  • Move the sanity check is_a($object, MyObj::class) from the constructor into a private method
  • Call this (now private) sanity check from method overrides such as offsetSet($index, $newval) and append($value)
Remembrancer answered 23/12, 2016 at 0:21 Comment(0)
G
2

The problem is that @var can just denote a single type - Not contain a complex formula. If you had a syntax for "array of Foo", why stop there and not add a syntax for "array of array, that contains 2 Foo's and three Bar's"? I understand that a list of elements is perhaps more generic than that, but it's a slippery slope.

Personally, I have some times used @var Foo[] to signify "an array of Foo's", but it's not supported by IDE's.

Gaulin answered 22/4, 2009 at 21:4 Comment(2)
One of the things that I love about C/C++ is that it actually keeps track of types down to this level. That would be a very pleasant slope to slip down.Subordinate
Is supported by Netbeans 7.2 (at least that's the version I use), but with a little ajustment namely: /* @var $foo Foo[] */. Just wrote an answer below about it. This can also be used inside foreach(){} loopsRrhoea
F
2
<?php foreach($this->models as /** @var Model_Object_WheelModel */ $model): ?>
    <?php
    // Type hinting now works:
    $model->getImage();
    ?>
<?php endforeach; ?>
Foraminifer answered 27/6, 2010 at 21:29 Comment(2)
This is very ugly. Say goodbye to clean code when you start programming like this.Neal
Rather look at my answer with defining the contents of the array: https://mcmap.net/q/80149/-phpdoc-type-hinting-for-array-of-objectsRrhoea
S
2

Here is yet another method of type hinting the structure of an array (Obligatory XKCD: https://xkcd.com/927/).

In my case I sometimes need to describe an argument or return type which is an array of arrays of objects, or even an array of objects with string keys (associative array). PHPStorm provides this ability because it uses Psalm which is a PHP static analysis tool. According to psalm docs on array types, you can do something like this for generic arrays:

/** @return array<TKey, TValue> */

Based on this, I have used it successfully to describe an array of arrays of objects like this:

/** @return array<int, array<int, ObjectClass>> */

or an array of objects with string keys:

/** @return array<string, ObjectClass> */

The options are endless.

Skidmore answered 9/6, 2023 at 18:59 Comment(0)
D
-5

I've found something which is working, it can save lives !

private $userList = array();
$userList = User::fetchAll(); // now $userList is an array of User objects
foreach ($userList as $user) {
   $user instanceof User;
   echo $user->getName();
}
Deft answered 13/1, 2010 at 10:43 Comment(4)
only problem is that introduces additional code to be executed, which is purely used by your IDE only. It's much better to define type hinting within the comments instead.Weidner
Wow this works great. You would end up with additional code but it seems to be harmless. I'm going to start doing: $x instanceof Y; // typehintPanaggio
Switch to an IDE that gives you code completion based on docblocks or inspections. If you do not want to switch your IDE file a feature request on the issue tracker of your IDE.Cowley
If this throws an exception if the type isn't correct, it can be useful for runtime type checking. If...Sensillum

© 2022 - 2024 — McMap. All rights reserved.