PHPackages                             angelxmoreno/get-set-annotations - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. angelxmoreno/get-set-annotations

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

angelxmoreno/get-set-annotations
================================

Helper for the GetSetTrait

v2.0.0(3y ago)11.2k[5 issues](https://github.com/angelxmoreno/get-set-methods-annotation/issues)MITPHPPHP &gt;=7.1

Since Mar 3Pushed 3y ago1 watchersCompare

[ Source](https://github.com/angelxmoreno/get-set-methods-annotation)[ Packagist](https://packagist.org/packages/angelxmoreno/get-set-annotations)[ RSS](/packages/angelxmoreno-get-set-annotations/feed)WikiDiscussions main Synced today

READMEChangelog (4)Dependencies (4)Versions (5)Used By (0)

GetSet Methods Annotation
=========================

[](#getset-methods-annotation)

A CLI script for reporting missing getter/setter methods due to the use of magic methods.

[![License](https://camo.githubusercontent.com/e8f8e4ef9bdd8f816659f5ce065aa9df8ed496703e7a201db94b7ec025c5105f/68747470733a2f2f706f7365722e707567782e6f72672f616e67656c786d6f72656e6f2f6765742d7365742d616e6e6f746174696f6e732f6c6963656e7365)](https://packagist.org/packages/angelxmoreno/get-set-annotations)[![Total Downloads](https://camo.githubusercontent.com/e7053b7e236c5838a8a50ea0ba754f5db46992bf1ab825d04349785711ec0507/68747470733a2f2f706f7365722e707567782e6f72672f616e67656c786d6f72656e6f2f6765742d7365742d616e6e6f746174696f6e732f646f776e6c6f616473)](https://packagist.org/packages/angelxmoreno/get-set-annotations)[![Latest Stable Version](https://camo.githubusercontent.com/65af994b7217a21ac08bd2e171c8aac7cebe068c5d4b435d10a2f91a2230e07a/68747470733a2f2f706f7365722e707567782e6f72672f616e67656c786d6f72656e6f2f6765742d7365742d616e6e6f746174696f6e732f762f737461626c65)](https://packagist.org/packages/angelxmoreno/get-set-annotations)[![Build Status](https://camo.githubusercontent.com/9c231a918a9f2ab1f7ab57ab531fc6e3ba86829f28db0584c7168bb9361169ed/68747470733a2f2f7472617669732d63692e6f72672f616e67656c786d6f72656e6f2f6765742d7365742d6d6574686f64732d616e6e6f746174696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/angelxmoreno/get-set-methods-annotation)[![Codacy Badge](https://camo.githubusercontent.com/26b9cc86c0c4fa28568932d3d77ec7288e7e03a3e8b9383a8a1678e3d8c463f0/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f6266386236353065326265323432323539656535356463623832326432303532)](https://www.codacy.com/app/angelxmoreno/get-set-methods-annotation?utm_source=github.com&utm_medium=referral&utm_content=angelxmoreno/get-set-methods-annotation&utm_campaign=Badge_Grade)[![Maintainability](https://camo.githubusercontent.com/e0f0fb316d2ba5892ba99e59a3b5b079288f0422d371ff40839aaff6d3eade06/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f66333437346631346566303830306638333931652f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/angelxmoreno/get-set-methods-annotation/maintainability)[![Test Coverage](https://camo.githubusercontent.com/910e3c6715fb9700cf514211a6727d55d729227ffe53caaba57f812318effe5d/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f66333437346631346566303830306638333931652f746573745f636f766572616765)](https://codeclimate.com/github/angelxmoreno/get-set-methods-annotation/test_coverage)

Why this project?
-----------------

[](#why-this-project)

I really enjoy using the [GetSetTrait](https://github.com/mikebarlow/GetSet) provided by [mikebarlow](https://github.com/mikebarlow). One of the issues with using magic getters and setters is that most IDEs lose knowledge about the class methods available. This can easily be addressed by adding proper `@method` entries to the class doc blocks. This can sometimes prove to be time consuming and open to typos.

I created this CLI script to generate the `@method` entries for classes missing defined getters/setters. Thought it was created to support the [GetSetTrait](https://github.com/mikebarlow/GetSet), it can be used for any implementation of magic getters and setters

Installation
------------

[](#installation)

```
composer require --dev angelxmoreno/get-set-annotations
```

Usage
-----

[](#usage)

```
./bin/get-set-scan [directory]
```

This prints out a report similar to the following:

```
Classname : Axm\GetSetAnnotations\ClassInfo
Path : /Users/amoreno/Projects/AmzRouter/get-set-methods-annotation/src/ClassInfo.php
DocBlock :
* @method void setPath(string $path)
* @method void setFqn(string $fqn)
* @method void setProperties(PropertyInfo[] $properties)
* @method void setHasMissingMethods(bool $has_missing_methods)
* @method bool getHasMissingMethods()

```

Testing
-------

[](#testing)

tests can be run in two different ways; locally and using a docker container.

### Locally

[](#locally)

```
composer tests:check
composer tests:coverage
```

### Using the built-in docker image

[](#using-the-built-in-docker-image)

```
composer docker:tests:check
composer docker:tests:coverage
```

Current test coverage
---------------------

[](#current-test-coverage)

```
Coverage Summary
----------------
                                                        Lines            %

 \                                                     45 / 71      63.38%
└── Axm\                                               45 / 71      63.38%
   └── GetSetAnnotations\                              45 / 71      63.38%
      ├── Analyser                                      7 /  7     100.00%
      │  ├── Analyser::buildClassInfosInPath()          6 /  6     100.00%
      │  └── Analyser::path()                           1 /  1     100.00%
      ├── CamelCase                                     2 /  3      66.67%
      │  └── CamelCase::convert()                       2 /  3      66.67%
      ├── ClassInfo                                    22 / 29      75.86%
      │  ├── ClassInfo::__construct()                   5 /  5     100.00%
      │  ├── ClassInfo::buildCurrentDocMethods()        2 /  2     100.00%
      │  ├── ClassInfo::buildMissingMethodsDoc()        0 /  7       0.00%
      │  ├── ClassInfo::buildPropertyInfoArray()       11 / 11     100.00%
      │  ├── ClassInfo::getFqn()                        1 /  1     100.00%
      │  ├── ClassInfo::getPath()                       1 /  1     100.00%
      │  ├── ClassInfo::getProperties()                 1 /  1     100.00%
      │  └── ClassInfo::hasMissingMethods()             1 /  1     100.00%
      ├── PropertyInfo                                 14 / 14     100.00%
      │  ├── PropertyInfo::__construct()                8 /  8     100.00%
      │  ├── PropertyInfo::getGetterFuncName()          1 /  1     100.00%
      │  ├── PropertyInfo::getName()                    1 /  1     100.00%
      │  ├── PropertyInfo::getSetterFuncName()          1 /  1     100.00%
      │  ├── PropertyInfo::getType()                    1 /  1     100.00%
      │  ├── PropertyInfo::isMissingGetterMethod()      1 /  1     100.00%
      │  └── PropertyInfo::isMissingSetterMethod()      1 /  1     100.00%
      └── Writer                                        0 / 18       0.00%
         ├── Writer::__construct()                      0 /  4       0.00%
         ├── Writer::outCli()                           0 /  3       0.00%
         ├── Writer::toCli()                            0 /  6       0.00%
         └── Writer::writeToFile()                      0 /  5       0.00%

Total: 63.38% (45/71)

Coverage collected in 0.069 seconds

```

License
=======

[](#license)

Copyright 2022 Angel S. Moreno (angelxmoreno). All rights reserved.

Licensed under the [MIT](http://www.opensource.org/licenses/mit-license.php) License. Redistributions of the source code included in this repository must retain the copyright notice found in each file.

###  Health Score

24

—

LowBetter than 35% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~554 days

Total

4

Last Release

1279d ago

Major Versions

v1.1.0 → v2.0.02022-09-20

PHP version history (3 changes)v1.0.0PHP ^5.6

v1.1.0PHP ~5.6 | ^7.0| ^7.1| ^7.2

v2.0.0PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/58aebae1bf475954887c4c975a24950aa32c0dd34026400fa0303f7a43672389?d=identicon)[angelxmoreno](/maintainers/angelxmoreno)

---

Top Contributors

[![angelxmoreno](https://avatars.githubusercontent.com/u/363479?v=4)](https://github.com/angelxmoreno "angelxmoreno (30 commits)")

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/angelxmoreno-get-set-annotations/health.svg)

```
[![Health](https://phpackages.com/badges/angelxmoreno-get-set-annotations/health.svg)](https://phpackages.com/packages/angelxmoreno-get-set-annotations)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3254.8M278](/packages/psalm-plugin-laravel)[darkghosthunter/preloader

Preloader helper to create a PHP-ready preload script from Opcache.

433657.4k1](/packages/darkghosthunter-preloader)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[cyberspectrum/contao-toolbox

Contao ToolBox

1026.3k](/packages/cyberspectrum-contao-toolbox)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
