2017 © Pedro Peláez
 

package zodiacsign

Calculates the zodiac sign for a given day and month.

image

whatsma/zodiacsign

Calculates the zodiac sign for a given day and month.

  • Friday, August 4, 2017
  • by whatsma
  • Repository
  • 1 Watchers
  • 1 Stars
  • 3,686 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 6 % Grown

The README.md

Zodiac Sign Calculator in PHP , (*1)

Zodiac Sign Calculator

A PHP calculator to calculate the zodiac sign for a given day and month., (*2)

Status

Total Downloads Latest Stable Version PHP Version Require, (*3)

Multi PHP Versions Windows/Mac Static Code Analysis, (*4)

Test Coverage Code Climate Scrutinizer Code Quality, (*5)

GitHub license, (*6)

Installation

Install ZodiacSign using Composer:, (*7)

$ composer require whatsma/zodiacsign:^1.0

Usage

Given a month (integer from 1 to 12) and a day (integer from 1 to 31), calculate the zodiac sign., (*8)

Returns a lower case string representing a zodiac sign, (eg "aries", or "leo")., (*9)

Raises an InvalidMonthException:, (*10)

  • if the input month is invalid (eg is non int, or has a value of 13)

Raises an InvalidDayException:, (*11)

  • if the day is invalid (eg is non int, or has a value of 32)
  • if the day is an invalid day of the month, such as 31st of February)

Example

<?php
require_once __DIR__.'/vendor/autoload.php';

use Whatsma\ZodiacSign;

$calculator = new ZodiacSign\Calculator();

try {
    $day = 17;
    $month = 8;
    $zodiacSign = $calculator->calculate($day, $month);
    echo $zodiacSign . "\n";
} catch (ZodiacSign\InvalidDayException $e) {
    echo "ERROR: Invalid Day";
} catch (ZodiacSign\InvalidMonthException $e) {
    echo "ERROR: Invalid Month";
}

// output: "leo"

Zodiac Sign Calculator out there, in the wild

The Versions

04/08 2017

dev-master

9999999-dev

Calculates the zodiac sign for a given day and month.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Wha Tsma

zodiac sign sun sign star sign astrological sign

04/08 2017

1.0.1

1.0.1.0

Calculates the zodiac sign for a given day and month.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Wha Tsma

zodiac sign sun sign star sign astrological sign

14/09 2016

1.0.0

1.0.0.0

Calculates the zodiac sign for a given day and month.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by Wha Tsma

zodiac sign sun sign star sign astrological sign