How To Install php-phpunit-phploc on CentOS 7

In this tutorial we learn how to install php-phpunit-phploc on CentOS 7. php-phpunit-phploc is A tool for quickly measuring the size of a PHP project

Introduction

In this tutorial we learn how to install php-phpunit-phploc on CentOS 7.

What is php-phpunit-phploc

phploc is a tool for quickly measuring the size of a PHP project. The goal of phploc is not not to replace more sophisticated tools such as phpcs, pdepend, or phpmd, but rather to provide an alternative to them when you just need to get a quick understanding of a project’s size.

We can use yum or dnf to install php-phpunit-phploc on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install php-phpunit-phploc.

Install php-phpunit-phploc on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install php-phpunit-phploc using yum by running the following command:

sudo yum -y install php-phpunit-phploc

Install php-phpunit-phploc on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install php-phpunit-phploc using dnf by running the following command:

sudo dnf -y install php-phpunit-phploc

How To Uninstall php-phpunit-phploc on CentOS 7

To uninstall only the php-phpunit-phploc package we can use the following command:

sudo dnf remove php-phpunit-phploc

References

Summary

In this tutorial we learn how to install php-phpunit-phploc on CentOS 7 using yum and dnf.