Analizo::Metric::NumberOfPublicAttributes3pm
Number of public attributes (npa) metric
Overview
The metric calculation is based on the following article and calculates the number of public attributes of a class.
Article: Monitoring of source code metrics in open source projects by Paulo Roberto Miranda Meirelles.
See the adaptation of the paragraph about Number of Public Attributes in the article:
It measures the encapsulation. The attributes of a class must only serve to the functionalities of itself. Thus, good programming practices recommend that the attributes of a class must be manipulated using the access methods (Beck, 1997), the attributes of a class must be private, indicating that the ideal number for this metric is zero.
Releases
2 releases since Debian 12 (Bookworm); the text changed 1 time.