Skip to content

Commit

Permalink
Enable phpstan linter at level 5
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaasuni committed Oct 11, 2023
1 parent 7035a14 commit c114aa4
Show file tree
Hide file tree
Showing 14 changed files with 40 additions and 33 deletions.
21 changes: 1 addition & 20 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,30 +52,11 @@ jobs:
path: ~/.composer/cache/
key: composer-cache
- name: Install dependencies
run: composer install --no-interaction
run: make deps
- name: Run all tests
run: make qa
- name: Send coverage
uses: codecov/codecov-action@v3
with:
flags: php-${{ matrix.php-version }}-${{ matrix.os }}
name: php-${{ matrix.php-version }}-${{ matrix.os }}

static-analysis:
name: Static Analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use php 8.2
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
- name: Cache module
uses: actions/cache@v3
with:
path: ~/.composer/cache/
key: composer-cache
- name: Install phpstan
run: composer require --dev phpstan/phpstan
- name: Analyse files
run: ./vendor/bin/phpstan analyse src test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a:6:{s:9:"classesIn";a:1:{s:21:"Com\Tecnick\File\Byte";a:6:{s:4:"name";s:4:"Byte";s:14:"namespacedName";s:21:"Com\Tecnick\File\Byte";s:9:"namespace";s:16:"Com\Tecnick\File";s:9:"startLine";i:32;s:7:"endLine";i:145;s:7:"methods";a:8:{s:11:"__construct";a:6:{s:10:"methodName";s:11:"__construct";s:9:"signature";s:17:"__construct($str)";s:10:"visibility";s:6:"public";s:9:"startLine";i:46;s:7:"endLine";i:49;s:3:"ccn";i:1;}s:7:"getByte";a:6:{s:10:"methodName";s:7:"getByte";s:9:"signature";s:16:"getByte($offset)";s:10:"visibility";s:6:"public";s:9:"startLine";i:59;s:7:"endLine";i:63;s:3:"ccn";i:1;}s:8:"getULong";a:6:{s:10:"methodName";s:8:"getULong";s:9:"signature";s:17:"getULong($offset)";s:10:"visibility";s:6:"public";s:9:"startLine";i:72;s:7:"endLine";i:76;s:3:"ccn";i:1;}s:9:"getUShort";a:6:{s:10:"methodName";s:9:"getUShort";s:9:"signature";s:18:"getUShort($offset)";s:10:"visibility";s:6:"public";s:9:"startLine";i:85;s:7:"endLine";i:89;s:3:"ccn";i:1;}s:8:"getShort";a:6:{s:10:"methodName";s:8:"getShort";s:9:"signature";s:17:"getShort($offset)";s:10:"visibility";s:6:"public";s:9:"startLine";i:98;s:7:"endLine";i:102;s:3:"ccn";i:1;}s:9:"getUFWord";a:6:{s:10:"methodName";s:9:"getUFWord";s:9:"signature";s:18:"getUFWord($offset)";s:10:"visibility";s:6:"public";s:9:"startLine";i:111;s:7:"endLine";i:114;s:3:"ccn";i:1;}s:8:"getFWord";a:6:{s:10:"methodName";s:8:"getFWord";s:9:"signature";s:17:"getFWord($offset)";s:10:"visibility";s:6:"public";s:9:"startLine";i:123;s:7:"endLine";i:130;s:3:"ccn";i:2;}s:8:"getFixed";a:6:{s:10:"methodName";s:8:"getFixed";s:9:"signature";s:17:"getFixed($offset)";s:10:"visibility";s:6:"public";s:9:"startLine";i:140;s:7:"endLine";i:144;s:3:"ccn";i:1;}}}}s:8:"traitsIn";a:0:{}s:11:"functionsIn";a:0:{}s:14:"linesOfCodeFor";a:3:{s:11:"linesOfCode";i:146;s:18:"commentLinesOfCode";i:88;s:21:"nonCommentLinesOfCode";i:58;}s:15:"ignoredLinesFor";a:1:{i:0;i:32;}s:17:"executableLinesIn";a:15:{i:48;i:2;i:61;i:3;i:62;i:4;i:74;i:5;i:75;i:6;i:87;i:7;i:88;i:8;i:100;i:9;i:101;i:10;i:113;i:11;i:125;i:12;i:126;i:13;i:127;i:14;i:129;i:15;i:143;i:16;}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a:6:{s:9:"classesIn";a:1:{s:20:"Com\Tecnick\File\Dir";a:6:{s:4:"name";s:3:"Dir";s:14:"namespacedName";s:20:"Com\Tecnick\File\Dir";s:9:"namespace";s:16:"Com\Tecnick\File";s:9:"startLine";i:32;s:7:"endLine";i:59;s:7:"methods";a:1:{s:13:"findParentDir";a:6:{s:10:"methodName";s:13:"findParentDir";s:9:"signature";s:26:"findParentDir($name, $dir)";s:10:"visibility";s:6:"public";s:9:"startLine";i:42;s:7:"endLine";i:58;s:3:"ccn";i:5;}}}}s:8:"traitsIn";a:0:{}s:11:"functionsIn";a:0:{}s:14:"linesOfCodeFor";a:3:{s:11:"linesOfCode";i:60;s:18:"commentLinesOfCode";i:34;s:21:"nonCommentLinesOfCode";i:26;}s:15:"ignoredLinesFor";a:1:{i:0;i:32;}s:17:"executableLinesIn";a:10:{i:44;i:1;i:45;i:2;i:46;i:3;i:48;i:4;i:49;i:5;i:50;i:6;i:52;i:7;i:54;i:8;i:55;i:9;i:57;i:10;}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a:6:{s:9:"classesIn";a:1:{s:21:"Com\Tecnick\File\File";a:6:{s:4:"name";s:4:"File";s:14:"namespacedName";s:21:"Com\Tecnick\File\File";s:9:"namespace";s:16:"Com\Tecnick\File";s:9:"startLine";i:36;s:7:"endLine";i:303;s:7:"methods";a:12:{s:10:"fopenLocal";a:6:{s:10:"methodName";s:10:"fopenLocal";s:9:"signature";s:28:"fopenLocal($filename, $mode)";s:10:"visibility";s:6:"public";s:9:"startLine";i:48;s:7:"endLine";i:60;s:3:"ccn";i:4;}s:8:"fReadInt";a:6:{s:10:"methodName";s:8:"fReadInt";s:9:"signature";s:17:"fReadInt($handle)";s:10:"visibility";s:6:"public";s:9:"startLine";i:69;s:7:"endLine";i:73;s:3:"ccn";i:1;}s:6:"rfRead";a:6:{s:10:"methodName";s:6:"rfRead";s:9:"signature";s:24:"rfRead($handle, $length)";s:10:"visibility";s:6:"public";s:9:"startLine";i:88;s:7:"endLine";i:105;s:3:"ccn";i:6;}s:15:"fileGetContents";a:6:{s:10:"methodName";s:15:"fileGetContents";s:9:"signature";s:22:"fileGetContents($file)";s:10:"visibility";s:6:"public";s:9:"startLine";i:115;s:7:"endLine";i:125;s:3:"ccn";i:3;}s:11:"getFileData";a:6:{s:10:"methodName";s:11:"getFileData";s:9:"signature";s:18:"getFileData($file)";s:10:"visibility";s:6:"public";s:9:"startLine";i:135;s:7:"endLine";i:143;s:3:"ccn";i:2;}s:10:"getUrlData";a:6:{s:10:"methodName";s:10:"getUrlData";s:9:"signature";s:16:"getUrlData($url)";s:10:"visibility";s:6:"public";s:9:"startLine";i:152;s:7:"endLine";i:182;s:3:"ccn";i:8;}s:15:"getAltFilePaths";a:6:{s:10:"methodName";s:15:"getAltFilePaths";s:9:"signature";s:22:"getAltFilePaths($file)";s:10:"visibility";s:6:"public";s:9:"startLine";i:191;s:7:"endLine";i:200;s:3:"ccn";i:1;}s:18:"getAltLocalUrlPath";a:6:{s:10:"methodName";s:18:"getAltLocalUrlPath";s:9:"signature";s:25:"getAltLocalUrlPath($file)";s:10:"visibility";s:9:"protected";s:9:"startLine";i:209;s:7:"endLine";i:224;s:3:"ccn";i:8;}s:24:"getAltMissingUrlProtocol";a:6:{s:10:"methodName";s:24:"getAltMissingUrlProtocol";s:9:"signature";s:31:"getAltMissingUrlProtocol($file)";s:10:"visibility";s:9:"protected";s:9:"startLine";i:233;s:7:"endLine";i:239;s:3:"ccn";i:3;}s:21:"getDefaultUrlProtocol";a:6:{s:10:"methodName";s:21:"getDefaultUrlProtocol";s:9:"signature";s:23:"getDefaultUrlProtocol()";s:10:"visibility";s:9:"protected";s:9:"startLine";i:246;s:7:"endLine";i:253;s:3:"ccn";i:3;}s:17:"getAltPathFromUrl";a:6:{s:10:"methodName";s:17:"getAltPathFromUrl";s:9:"signature";s:23:"getAltPathFromUrl($url)";s:10:"visibility";s:9:"protected";s:9:"startLine";i:262;s:7:"endLine";i:282;s:3:"ccn";i:6;}s:17:"getAltUrlFromPath";a:6:{s:10:"methodName";s:17:"getAltUrlFromPath";s:9:"signature";s:24:"getAltUrlFromPath($file)";s:10:"visibility";s:9:"protected";s:9:"startLine";i:291;s:7:"endLine";i:302;s:3:"ccn";i:5;}}}}s:8:"traitsIn";a:0:{}s:11:"functionsIn";a:0:{}s:14:"linesOfCodeFor";a:3:{s:11:"linesOfCode";i:304;s:18:"commentLinesOfCode";i:124;s:21:"nonCommentLinesOfCode";i:180;}s:15:"ignoredLinesFor";a:1:{i:0;i:36;}s:17:"executableLinesIn";a:94:{i:50;i:1;i:51;i:2;i:52;i:3;i:53;i:4;i:55;i:5;i:56;i:6;i:57;i:7;i:59;i:8;i:71;i:9;i:72;i:10;i:90;i:11;i:91;i:12;i:92;i:13;i:94;i:14;i:95;i:15;i:97;i:16;i:98;i:17;i:99;i:18;i:100;i:19;i:101;i:20;i:104;i:21;i:117;i:22;i:118;i:23;i:119;i:24;i:120;i:25;i:121;i:26;i:124;i:27;i:137;i:28;i:138;i:29;i:139;i:30;i:142;i:31;i:155;i:32;i:156;i:33;i:157;i:34;i:159;i:35;i:162;i:36;i:163;i:37;i:164;i:38;i:165;i:39;i:166;i:40;i:167;i:41;i:168;i:42;i:170;i:43;i:171;i:44;i:172;i:45;i:173;i:46;i:174;i:47;i:175;i:48;i:176;i:49;i:177;i:50;i:179;i:51;i:180;i:52;i:181;i:53;i:193;i:54;i:194;i:55;i:195;i:56;i:196;i:57;i:197;i:58;i:198;i:59;i:199;i:60;i:212;i:61;i:213;i:62;i:214;i:63;i:215;i:64;i:216;i:65;i:218;i:66;i:219;i:67;i:220;i:68;i:223;i:69;i:235;i:70;i:236;i:71;i:238;i:72;i:248;i:73;i:249;i:74;i:250;i:75;i:252;i:76;i:265;i:77;i:266;i:78;i:267;i:79;i:269;i:80;i:271;i:81;i:272;i:82;i:273;i:83;i:275;i:84;i:276;i:85;i:278;i:86;i:279;i:87;i:281;i:88;i:294;i:89;i:295;i:90;i:296;i:91;i:298;i:92;i:299;i:93;i:301;i:94;}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a:6:{s:9:"classesIn";a:1:{s:26:"Com\Tecnick\File\Exception";a:6:{s:4:"name";s:9:"Exception";s:14:"namespacedName";s:26:"Com\Tecnick\File\Exception";s:9:"namespace";s:16:"Com\Tecnick\File";s:9:"startLine";i:32;s:7:"endLine";i:34;s:7:"methods";a:0:{}}}s:8:"traitsIn";a:0:{}s:11:"functionsIn";a:0:{}s:14:"linesOfCodeFor";a:3:{s:11:"linesOfCode";i:35;s:18:"commentLinesOfCode";i:26;s:21:"nonCommentLinesOfCode";i:9;}s:15:"ignoredLinesFor";a:1:{i:0;i:32;}s:17:"executableLinesIn";a:0:{}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a:6:{s:9:"classesIn";a:1:{s:22:"Com\Tecnick\File\Cache";a:6:{s:4:"name";s:5:"Cache";s:14:"namespacedName";s:22:"Com\Tecnick\File\Cache";s:9:"namespace";s:16:"Com\Tecnick\File";s:9:"startLine";i:30;s:7:"endLine";i:159;s:7:"methods";a:8:{s:11:"__construct";a:6:{s:10:"methodName";s:11:"__construct";s:9:"signature";s:20:"__construct($prefix)";s:10:"visibility";s:6:"public";s:9:"startLine";i:51;s:7:"endLine";i:59;s:3:"ccn";i:2;}s:12:"getCachePath";a:6:{s:10:"methodName";s:12:"getCachePath";s:9:"signature";s:14:"getCachePath()";s:10:"visibility";s:6:"public";s:9:"startLine";i:66;s:7:"endLine";i:69;s:3:"ccn";i:1;}s:12:"setCachePath";a:6:{s:10:"methodName";s:12:"setCachePath";s:9:"signature";s:19:"setCachePath($path)";s:10:"visibility";s:6:"public";s:9:"startLine";i:76;s:7:"endLine";i:84;s:3:"ccn";i:3;}s:13:"getFilePrefix";a:6:{s:10:"methodName";s:13:"getFilePrefix";s:9:"signature";s:15:"getFilePrefix()";s:10:"visibility";s:6:"public";s:9:"startLine";i:91;s:7:"endLine";i:94;s:3:"ccn";i:1;}s:14:"getNewFileName";a:6:{s:10:"methodName";s:14:"getNewFileName";s:9:"signature";s:27:"getNewFileName($type, $key)";s:10:"visibility";s:6:"public";s:9:"startLine";i:104;s:7:"endLine";i:107;s:3:"ccn";i:1;}s:6:"delete";a:6:{s:10:"methodName";s:6:"delete";s:9:"signature";s:19:"delete($type, $key)";s:10:"visibility";s:6:"public";s:9:"startLine";i:116;s:7:"endLine";i:130;s:3:"ccn";i:4;}s:21:"defineSystemCachePath";a:6:{s:10:"methodName";s:21:"defineSystemCachePath";s:9:"signature";s:23:"defineSystemCachePath()";s:10:"visibility";s:9:"protected";s:9:"startLine";i:135;s:7:"endLine";i:142;s:3:"ccn";i:3;}s:13:"normalizePath";a:6:{s:10:"methodName";s:13:"normalizePath";s:9:"signature";s:20:"normalizePath($path)";s:10:"visibility";s:9:"protected";s:9:"startLine";i:151;s:7:"endLine";i:158;s:3:"ccn";i:2;}}}}s:8:"traitsIn";a:0:{}s:11:"functionsIn";a:0:{}s:14:"linesOfCodeFor";a:3:{s:11:"linesOfCode";i:160;s:18:"commentLinesOfCode";i:80;s:21:"nonCommentLinesOfCode";i:80;}s:15:"ignoredLinesFor";a:1:{i:0;i:30;}s:17:"executableLinesIn";a:29:{i:53;i:3;i:54;i:4;i:55;i:5;i:56;i:6;i:58;i:7;i:68;i:8;i:78;i:9;i:80;i:10;i:81;i:11;i:83;i:12;i:93;i:13;i:106;i:14;i:118;i:15;i:119;i:16;i:120;i:17;i:121;i:18;i:122;i:19;i:125;i:20;i:126;i:21;i:127;i:22;i:128;i:23;i:137;i:24;i:138;i:25;i:140;i:26;i:141;i:27;i:153;i:28;i:154;i:29;i:155;i:30;i:157;i:31;}}
1 change: 1 addition & 0 deletions .phpunit.cache/test-results
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"version":1,"defects":[],"times":{"Test\\ByteTest::testGetByte#0":0.025,"Test\\ByteTest::testGetByte#1":0.001,"Test\\ByteTest::testGetByte#2":0.001,"Test\\ByteTest::testGetByte#3":0.001,"Test\\ByteTest::testGetByte#4":0.001,"Test\\ByteTest::testGetByte#5":0.001,"Test\\ByteTest::testGetByte#6":0.001,"Test\\ByteTest::testGetByte#7":0.001,"Test\\ByteTest::testGetByte#8":0.001,"Test\\ByteTest::testGetByte#9":0.001,"Test\\ByteTest::testGetByte#10":0.001,"Test\\ByteTest::testGetByte#11":0.001,"Test\\ByteTest::testGetByte#12":0.001,"Test\\ByteTest::testGetByte#13":0.001,"Test\\ByteTest::testGetByte#14":0.001,"Test\\ByteTest::testGetByte#15":0.001,"Test\\ByteTest::testGetByte#16":0.001,"Test\\ByteTest::testGetByte#17":0.001,"Test\\ByteTest::testGetByte#18":0.001,"Test\\ByteTest::testGetByte#19":0.001,"Test\\ByteTest::testGetByte#20":0.001,"Test\\ByteTest::testGetByte#21":0.001,"Test\\ByteTest::testGetByte#22":0.001,"Test\\ByteTest::testGetByte#23":0.001,"Test\\ByteTest::testGetULong#0":0.001,"Test\\ByteTest::testGetULong#1":0.001,"Test\\ByteTest::testGetULong#2":0.001,"Test\\ByteTest::testGetULong#3":0.001,"Test\\ByteTest::testGetULong#4":0.001,"Test\\ByteTest::testGetULong#5":0.001,"Test\\ByteTest::testGetULong#6":0.001,"Test\\ByteTest::testGetULong#7":0.001,"Test\\ByteTest::testGetULong#8":0.001,"Test\\ByteTest::testGetULong#9":0.001,"Test\\ByteTest::testGetULong#10":0.001,"Test\\ByteTest::testGetULong#11":0.001,"Test\\ByteTest::testGetULong#12":0.001,"Test\\ByteTest::testGetULong#13":0.001,"Test\\ByteTest::testGetULong#14":0.001,"Test\\ByteTest::testGetULong#15":0.001,"Test\\ByteTest::testGetULong#16":0.001,"Test\\ByteTest::testGetULong#17":0.001,"Test\\ByteTest::testGetULong#18":0.001,"Test\\ByteTest::testGetULong#19":0.001,"Test\\ByteTest::testGetULong#20":0.001,"Test\\ByteTest::testGetUShort#0":0.001,"Test\\ByteTest::testGetUShort#1":0.001,"Test\\ByteTest::testGetUShort#2":0.001,"Test\\ByteTest::testGetUShort#3":0.001,"Test\\ByteTest::testGetUShort#4":0.001,"Test\\ByteTest::testGetUShort#5":0.001,"Test\\ByteTest::testGetUShort#6":0.001,"Test\\ByteTest::testGetUShort#7":0.001,"Test\\ByteTest::testGetUShort#8":0.001,"Test\\ByteTest::testGetUShort#9":0.001,"Test\\ByteTest::testGetUShort#10":0.001,"Test\\ByteTest::testGetUShort#11":0.001,"Test\\ByteTest::testGetUShort#12":0.001,"Test\\ByteTest::testGetUShort#13":0.001,"Test\\ByteTest::testGetUShort#14":0.001,"Test\\ByteTest::testGetUShort#15":0.001,"Test\\ByteTest::testGetUShort#16":0.001,"Test\\ByteTest::testGetUShort#17":0.001,"Test\\ByteTest::testGetUShort#18":0.001,"Test\\ByteTest::testGetUShort#19":0.001,"Test\\ByteTest::testGetUShort#20":0.001,"Test\\ByteTest::testGetUShort#21":0.001,"Test\\ByteTest::testGetUShort#22":0.001,"Test\\ByteTest::testGetUFWord#0":0.001,"Test\\ByteTest::testGetUFWord#1":0.001,"Test\\ByteTest::testGetUFWord#2":0.001,"Test\\ByteTest::testGetUFWord#3":0.001,"Test\\ByteTest::testGetUFWord#4":0.001,"Test\\ByteTest::testGetUFWord#5":0.001,"Test\\ByteTest::testGetUFWord#6":0.001,"Test\\ByteTest::testGetUFWord#7":0.001,"Test\\ByteTest::testGetUFWord#8":0.001,"Test\\ByteTest::testGetUFWord#9":0.001,"Test\\ByteTest::testGetUFWord#10":0.001,"Test\\ByteTest::testGetUFWord#11":0.001,"Test\\ByteTest::testGetUFWord#12":0.001,"Test\\ByteTest::testGetUFWord#13":0.001,"Test\\ByteTest::testGetUFWord#14":0.001,"Test\\ByteTest::testGetUFWord#15":0.001,"Test\\ByteTest::testGetUFWord#16":0.001,"Test\\ByteTest::testGetUFWord#17":0.001,"Test\\ByteTest::testGetUFWord#18":0.001,"Test\\ByteTest::testGetUFWord#19":0.001,"Test\\ByteTest::testGetUFWord#20":0.001,"Test\\ByteTest::testGetUFWord#21":0.001,"Test\\ByteTest::testGetUFWord#22":0.001,"Test\\ByteTest::testGetShort#0":0.001,"Test\\ByteTest::testGetShort#1":0.001,"Test\\ByteTest::testGetShort#2":0.001,"Test\\ByteTest::testGetShort#3":0.001,"Test\\ByteTest::testGetShort#4":0.001,"Test\\ByteTest::testGetShort#5":0.001,"Test\\ByteTest::testGetShort#6":0.001,"Test\\ByteTest::testGetShort#7":0.001,"Test\\ByteTest::testGetShort#8":0.001,"Test\\ByteTest::testGetShort#9":0.001,"Test\\ByteTest::testGetShort#10":0.001,"Test\\ByteTest::testGetShort#11":0.001,"Test\\ByteTest::testGetShort#12":0.001,"Test\\ByteTest::testGetShort#13":0.001,"Test\\ByteTest::testGetShort#14":0.001,"Test\\ByteTest::testGetShort#15":0.001,"Test\\ByteTest::testGetShort#16":0.001,"Test\\ByteTest::testGetShort#17":0.001,"Test\\ByteTest::testGetShort#18":0.001,"Test\\ByteTest::testGetShort#19":0.001,"Test\\ByteTest::testGetShort#20":0.001,"Test\\ByteTest::testGetShort#21":0.001,"Test\\ByteTest::testGetShort#22":0.001,"Test\\ByteTest::testGetFWord#0":0.001,"Test\\ByteTest::testGetFWord#1":0.001,"Test\\ByteTest::testGetFWord#2":0.001,"Test\\ByteTest::testGetFWord#3":0.001,"Test\\ByteTest::testGetFWord#4":0.001,"Test\\ByteTest::testGetFWord#5":0.001,"Test\\ByteTest::testGetFWord#6":0.001,"Test\\ByteTest::testGetFWord#7":0.001,"Test\\ByteTest::testGetFWord#8":0.001,"Test\\ByteTest::testGetFWord#9":0.001,"Test\\ByteTest::testGetFWord#10":0.001,"Test\\ByteTest::testGetFWord#11":0.001,"Test\\ByteTest::testGetFWord#12":0.001,"Test\\ByteTest::testGetFWord#13":0.001,"Test\\ByteTest::testGetFWord#14":0.001,"Test\\ByteTest::testGetFWord#15":0.001,"Test\\ByteTest::testGetFWord#16":0.001,"Test\\ByteTest::testGetFWord#17":0.001,"Test\\ByteTest::testGetFWord#18":0.001,"Test\\ByteTest::testGetFWord#19":0.001,"Test\\ByteTest::testGetFWord#20":0.001,"Test\\ByteTest::testGetFWord#21":0.001,"Test\\ByteTest::testGetFWord#22":0.001,"Test\\ByteTest::testGetFixed#0":0.001,"Test\\ByteTest::testGetFixed#1":0.001,"Test\\ByteTest::testGetFixed#2":0.001,"Test\\ByteTest::testGetFixed#3":0.001,"Test\\ByteTest::testGetFixed#4":0.001,"Test\\ByteTest::testGetFixed#5":0.001,"Test\\ByteTest::testGetFixed#6":0.001,"Test\\ByteTest::testGetFixed#7":0.001,"Test\\ByteTest::testGetFixed#8":0.001,"Test\\ByteTest::testGetFixed#9":0.001,"Test\\ByteTest::testGetFixed#10":0.001,"Test\\ByteTest::testGetFixed#11":0.001,"Test\\ByteTest::testGetFixed#12":0.001,"Test\\ByteTest::testGetFixed#13":0.001,"Test\\ByteTest::testGetFixed#14":0.001,"Test\\ByteTest::testGetFixed#15":0.001,"Test\\ByteTest::testGetFixed#16":0.001,"Test\\ByteTest::testGetFixed#17":0.001,"Test\\ByteTest::testGetFixed#18":0.001,"Test\\ByteTest::testGetFixed#19":0.001,"Test\\ByteTest::testGetFixed#20":0.001,"Test\\CacheTest::testAutoPrefix":0.008,"Test\\CacheTest::testGetCachePath":0.001,"Test\\CacheTest::testGetFilePrefix":0.001,"Test\\CacheTest::testGetNewFileName":0.001,"Test\\CacheTest::testDelete":0.001,"Test\\DirTest::testGetAltFilePaths#0":0.004,"Test\\DirTest::testGetAltFilePaths#1":0.001,"Test\\DirTest::testGetAltFilePaths#2":0.001,"Test\\FileTest::testFopenLocal":0.017,"Test\\FileTest::testFopenLocalNonLocal":0.002,"Test\\FileTest::testFopenLocalMissing":0.001,"Test\\FileTest::testfReadInt":0.001,"Test\\FileTest::testRfRead":0.001,"Test\\FileTest::testRfReadException":0.001,"Test\\FileTest::testGetAltFilePaths#0":0.001,"Test\\FileTest::testGetAltFilePaths#1":0.001,"Test\\FileTest::testGetAltFilePaths#2":0.001,"Test\\FileTest::testGetAltFilePaths#3":0.001,"Test\\FileTest::testGetAltFilePaths#4":0.001,"Test\\FileTest::testGetAltFilePaths#5":0.001,"Test\\FileTest::testFileGetContentsException":0.001,"Test\\FileTest::testFileGetContents":0.001,"Test\\FileTest::testFileGetContentsCurl":0.515}}
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ endif
deps: ensuretarget
rm -rf ./vendor/*
($(COMPOSER) install -vvv --no-interaction)
curl --silent --show-error --fail --location --output ./vendor/phpstan.phar https://github.com/phpstan/phpstan/releases/download/1.10.38/phpstan.phar \
&& chmod +x ./vendor/phpstan.phar

# Generate source code documentation
.PHONY: doc
Expand Down Expand Up @@ -205,6 +207,7 @@ lint:
./vendor/bin/phpcs --ignore="./vendor/" --standard=phpcs.xml src test
./vendor/bin/phpmd src text codesize,unusedcode,naming,design --exclude vendor
./vendor/bin/phpmd test text unusedcode,naming,design
php -r 'exit((int)version_compare(PHP_MAJOR_VERSION, "7", ">"));' || ./vendor/phpstan.phar analyse

# Run all tests and reports
.PHONY: qa
Expand Down Expand Up @@ -250,6 +253,8 @@ tag:
# Run unit tests
.PHONY: test
test:
cp phpunit.xml.dist phpunit.xml
./vendor/bin/phpunit --migrate-configuration || true
./vendor/bin/phpunit test

# Remove all installed files
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.7.32
1.7.33
10 changes: 10 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
parameters:
level: 5
paths:
- src
- test
scanDirectories:
- vendor
ignoreErrors:
reportUnmatchedIgnoredErrors: false
treatPhpDocTypesAsCertain: false
2 changes: 1 addition & 1 deletion src/Byte.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public function getFWord($offset)
*
* @param int $offset Point from where to read the data.
*
* @return int 16 bit value
* @return float
*
*/
public function getFixed($offset)
Expand Down
Loading

0 comments on commit c114aa4

Please sign in to comment.