forked from vegvari/CalendarTest
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Romeo Vegvari
committed
Mar 23, 2016
1 parent
6511f17
commit 192f2cd
Showing
6 changed files
with
541 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"name": "vegvari/calendartest", | ||
"description": "Calendar Test", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Romeo Vegvari", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"minimum-stability": "stable", | ||
"require": { | ||
"php": ">=5.6" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Calendar\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Calendar\\": "test/" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0"?> | ||
<ruleset> | ||
<file>./src</file> | ||
<file>./test</file> | ||
|
||
<rule ref="PSR2" /> | ||
|
||
<rule ref="Generic.Files.LineLength"> | ||
<properties> | ||
<property name="lineLimit" value="160" /> | ||
</properties> | ||
</rule> | ||
|
||
<rule ref="PEAR.Commenting"> | ||
<exclude name="PEAR.Commenting.FileComment" /> | ||
<exclude name="PEAR.Commenting.ClassComment" /> | ||
<exclude name="PEAR.Commenting.FunctionComment.Missing" /> | ||
<exclude name="PEAR.Commenting.FunctionComment.MissingParamComment" /> | ||
<exclude name="PEAR.Commenting.FunctionComment.MissingReturn" /> | ||
</rule> | ||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0"?> | ||
<ruleset | ||
xmlns="http://pmd.sf.net/ruleset/1.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" | ||
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"> | ||
|
||
<rule ref="rulesets/cleancode.xml" /> | ||
|
||
<rule ref="rulesets/codesize.xml"> | ||
<exclude name="TooManyPublicMethods" /> | ||
</rule> | ||
|
||
<rule ref="rulesets/controversial.xml"> | ||
<exclude name="CamelCasePropertyName" /> | ||
<exclude name="CamelCaseParameterName" /> | ||
<exclude name="CamelCaseVariableName" /> | ||
</rule> | ||
|
||
<rule ref="rulesets/design.xml" /> | ||
|
||
<rule ref="rulesets/naming.xml"> | ||
<exclude name="ShortMethodName" /> | ||
</rule> | ||
|
||
<rule ref="rulesets/unusedcode.xml" /> | ||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/4.1/phpunit.xsd" | ||
backupGlobals="false" | ||
colors="true" | ||
bootstrap="vendor/autoload.php"> | ||
|
||
<php> | ||
<ini name="error_reporting" value="-16385" /> | ||
</php> | ||
|
||
<testsuites> | ||
<testsuite name="Alius/Database tests"> | ||
<directory>./test/</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<filter> | ||
<whitelist> | ||
<directory>./</directory> | ||
<exclude> | ||
<directory>./test</directory> | ||
<directory>./vendor</directory> | ||
</exclude> | ||
</whitelist> | ||
</filter> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?php | ||
|
||
namespace Calendar; | ||
|
||
use DateTimeInterface; | ||
|
||
interface CalendarInterface | ||
{ | ||
/** | ||
* @param DateTimeInterface $datetime | ||
*/ | ||
public function __construct(DateTimeInterface $datetime); | ||
|
||
/** | ||
* Get the day | ||
* | ||
* @return int | ||
*/ | ||
public function getDay(); | ||
|
||
/** | ||
* Get the weekday (1-7, 1 = Monday) | ||
* | ||
* @return int | ||
*/ | ||
public function getWeekDay(); | ||
|
||
/** | ||
* Get the first weekday of this month (1-7, 1 = Monday) | ||
* | ||
* @return int | ||
*/ | ||
public function getFirstWeekDay(); | ||
|
||
/** | ||
* Get the first week of this month (18th March => 9 because March starts on week 9) | ||
* | ||
* @return int | ||
*/ | ||
public function getFirstWeek(); | ||
|
||
/** | ||
* Get the number of days in this month | ||
* | ||
* @return int | ||
*/ | ||
public function getNumberOfDaysInThisMonth(); | ||
|
||
/** | ||
* Get the number of days in the previous month | ||
* | ||
* @return int | ||
*/ | ||
public function getNumberOfDaysInPreviousMonth(); | ||
|
||
/** | ||
* Get the calendar array | ||
* | ||
* @return array | ||
*/ | ||
public function getCalendar(); | ||
} |
Oops, something went wrong.