PHPackages                             espiktarenko/mortgage - 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. espiktarenko/mortgage

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

espiktarenko/mortgage
=====================

mortgage calculate

v1.0.0(2y ago)05PHPPHP &gt;=7.4

Since Nov 17Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Gorgona66/mortgage)[ Packagist](https://packagist.org/packages/espiktarenko/mortgage)[ RSS](/packages/espiktarenko-mortgage/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

MortgageCount
=============

[](#mortgagecount)

This is a PHP class that calculates the cost of a mortgage based on the sum, years, and interest rate.

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

[](#installation)

The package can be installed via Composer by running the following command:

```
composer require espiktarenko/mortgage

```

Usage
-----

[](#usage)

First, include the class in your PHP file:

```
require_once 'path/to/MortgageCount.php';
```

Then, create an instance of the `MortgageCount` class:

```
$mortgage = new Espiktarenko\Mortgage\MortgageCount();
```

To calculate the cost of a mortgage, call the `mortgage` method and pass in the sum, years, and interest rate as parameters:

```
$cost = $mortgage->mortgage($sum, $years, $interestRate);
```

The method will return the calculated cost of the mortgage.

If any of the parameters are null, the method will return the string "Not enough data".

Example
-------

[](#example)

```
$mortgage = new Espiktarenko\Mortgage\MortgageCount();

$sum = 100000; // The loan amount
$years = 10; // The loan term in years
$interestRate = 5; // The interest rate in percentage

$cost = $mortgage->mortgage($sum, $years, $interestRate);
```

This will output: "It'll cost you: 50000".

Contribution
------------

[](#contribution)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License
-------

[](#license)

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

906d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4c877f94bbf41bd83a49b42785ee6a6e50e5f0fb1cf828628761226c0a86b0ff?d=identicon)[elena.spiktarenko@gmail.com](/maintainers/elena.spiktarenko@gmail.com)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/espiktarenko-mortgage/health.svg)

```
[![Health](https://phpackages.com/badges/espiktarenko-mortgage/health.svg)](https://phpackages.com/packages/espiktarenko-mortgage)
```

###  Alternatives

[chenkby/yii2-region

Yii2中国省市区三级联动

325.1k](/packages/chenkby-yii2-region)

PHPackages © 2026

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