Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	HeuristicAnalyser.php
  • Loading branch information
alexandergull committed Aug 5, 2024
2 parents 954d6f7 + c16465d commit 41d4d9a
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 3 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ composer.lock
package-lock.json
/lib/
/bad/
/index.php
1 change: 1 addition & 0 deletions DataStructures/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php
1 change: 1 addition & 0 deletions Exceptions/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php
9 changes: 7 additions & 2 deletions HeuristicAnalyser.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public function __construct($input, $self = null)
$this->path = $input['path'];
$this->curr_dir = dirname($this->path);
$this->extension = pathinfo($this->path, PATHINFO_EXTENSION);
$this->checkFileSize(filesize($this->path));
$this->checkFileSize((int)filesize($this->path));
$this->checkFileAccessibility();
$this->file_size = (int)filesize($this->path);
$this->file_work = file_get_contents($this->path);
Expand Down Expand Up @@ -287,7 +287,12 @@ public function processContent()
// Analysing code style
// Do this, only for initial code
if ( ! $this->evaluations->evaluations ) {
if ( $this->extension !== 'html' && $this->extension !== 'js' ) {
if (
$this->extension !== 'html' &&
$this->extension !== 'htm' &&
$this->extension !== 'shtml' &&
$this->extension !== 'js'
) {
$this->code_style->analyseLineLengths($this->file_content);
$this->code_style->analyseHumanUnreadableCode($this->file_content);
$this->code_style->analyseWeightOfNoise($this->file_content);
Expand Down
1 change: 1 addition & 0 deletions Modules/Tokens.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* @property Token|null $next3 Iteration Token
* @property Token|null $next4 Iteration Token
*/
#[\AllowDynamicProperties]
class Tokens implements \Iterator, \ArrayAccess, \Countable
{
/**
Expand Down
1 change: 1 addition & 0 deletions Modules/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php
1 change: 1 addition & 0 deletions Structures/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php
1 change: 1 addition & 0 deletions Vendors/TiktokenPhp/data/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php
1 change: 1 addition & 0 deletions Vendors/TiktokenPhp/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php
1 change: 1 addition & 0 deletions Vendors/TiktokenPhp/src/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php
1 change: 1 addition & 0 deletions Vendors/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php
1 change: 1 addition & 0 deletions index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php

0 comments on commit 41d4d9a

Please sign in to comment.