Skip to content

Commit c65ff60

Browse files
🔀 Merge pull request #15 from vlasscontreras/develop
v1.3.0
2 parents c6db264 + 7f7d525 commit c65ff60

File tree

21 files changed

+123
-82
lines changed

21 files changed

+123
-82
lines changed

‎.github/workflows/static.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
php_version: ${{ matrix.php }}
2828

2929
- name: Run linters 👀
30-
run: composer lint:phpcs
30+
run: ./vendor/bin/phpcs
3131

3232
phpstan:
3333
runs-on: ubuntu-latest

‎.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
php_version: ${{ matrix.php }}
2828

2929
- name: Run unit tests 🧪
30-
run: ./vendor/bin/phpunit --testsuite=Unit
30+
run: ./vendor/bin/phpunit --testsuite=unit
3131

32-
- name: Run feature tests 🧪
33-
run: ./vendor/bin/phpunit --testsuite=Feature
32+
- name: Run integration tests 🧪
33+
run: ./vendor/bin/phpunit --testsuite=integration

‎.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,6 @@ composer.phar
1818

1919
# Build data
2020
/build/
21+
22+
# macOS
23+
.DS_Store

‎composer.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@
3030
}
3131
],
3232
"minimum-stability": "stable",
33-
"scripts": {
34-
"lint:phpcs": [
35-
"vendor/bin/phpcs . --standard=PSR12 --extensions=php --ignore=vendor/"
36-
]
37-
},
3833
"config": {
3934
"platform": {
4035
"php": "8.0"

‎composer.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎phpcs.xml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ruleset>
3+
<!--
4+
#############################################################################
5+
COMMAND LINE ARGUMENTS
6+
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml
7+
#############################################################################
8+
-->
9+
10+
<!-- Pass some flags to PHPCS:
11+
p flag: Show progress of the run.
12+
s flag: Show sniff codes in all reports.
13+
v flag: Print processed files.
14+
-->
15+
<arg value="psv"/>
16+
17+
<!-- Check up to 8 files simultaneously. -->
18+
<arg name="parallel" value="8"/>
19+
20+
<!-- Check PHP files. -->
21+
<arg name="extensions" value="php,cm"/>
22+
23+
<!-- Check all files in this directory and the directories below it. -->
24+
<file>.</file>
25+
26+
<!-- Exclude patterns. -->
27+
<exclude-pattern>/vendor/*</exclude-pattern>
28+
29+
<!--
30+
#############################################################################
31+
USE THE PSR-12 RULESET
32+
#############################################################################
33+
-->
34+
35+
<rule ref="PSR12"/>
36+
</ruleset>

‎phpunit.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
colors="true"
66
>
77
<testsuites>
8-
<testsuite name="Unit">
8+
<testsuite name="unit">
99
<directory suffix="Test.php">./tests/Unit</directory>
1010
</testsuite>
11-
<testsuite name="Feature">
12-
<directory suffix="Test.php">./tests/Feature</directory>
11+
<testsuite name="integration">
12+
<directory suffix="Test.php">./tests/Integration</directory>
1313
</testsuite>
1414
</testsuites>
1515
<coverage processUncoveredFiles="true">

‎src/TimeEntry/TimeEntry.php renamed to ‎src/Clockify/TimeEntry.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
declare(strict_types=1);
44

5-
namespace VlassContreras\Clockission\TimeEntry;
5+
namespace VlassContreras\Clockission\Clockify;
66

7-
use VlassContreras\Clockission\Contracts\ClockifyEntry;
7+
use VlassContreras\Clockission\Contracts\TimeEntry as TimeEntryContract;
88

9-
class TimeEntry implements ClockifyEntry
9+
class TimeEntry implements TimeEntryContract
1010
{
1111
/**
1212
* Set up time entry
@@ -60,9 +60,7 @@ public function getHours(): float
6060
}
6161

6262
/**
63-
* Convert time entry to array.
64-
*
65-
* @return array<string, string|float>
63+
* @inheritDoc
6664
*/
6765
public function toArray(): array
6866
{

‎src/Contracts/ClockifyEntry.php renamed to ‎src/Contracts/TimeEntry.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace VlassContreras\Clockission\Contracts;
66

7-
interface ClockifyEntry extends Arrayable
7+
interface TimeEntry extends Arrayable
88
{
99
/**
1010
* Get the time entry description
@@ -26,4 +26,11 @@ public function getDate(): string;
2626
* @return float
2727
*/
2828
public function getHours(): float;
29+
30+
/**
31+
* Convert time entry to array.
32+
*
33+
* @return array<string, string|float>
34+
*/
35+
public function toArray(): array;
2936
}

‎src/Contracts/MissionSlip.php renamed to ‎src/Contracts/TimeSlip.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace VlassContreras\Clockission\Contracts;
66

7-
interface MissionSlip extends Arrayable
7+
interface TimeSlip extends Arrayable
88
{
99
/**
1010
* Get the time slip activity type

0 commit comments

Comments
 (0)