diff --git a/.gitignore b/.gitignore index 3a7440a..2631d4f 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,3 @@ composer.lock package-lock.json /lib/ /bad/ -/index.php diff --git a/DataStructures/index.php b/DataStructures/index.php new file mode 100644 index 0000000..b3d9bbc --- /dev/null +++ b/DataStructures/index.php @@ -0,0 +1 @@ +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); @@ -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); diff --git a/Modules/Tokens.php b/Modules/Tokens.php index 166b982..6a0d3df 100644 --- a/Modules/Tokens.php +++ b/Modules/Tokens.php @@ -17,6 +17,7 @@ * @property Token|null $next3 Iteration Token * @property Token|null $next4 Iteration Token */ +#[\AllowDynamicProperties] class Tokens implements \Iterator, \ArrayAccess, \Countable { /** diff --git a/Modules/index.php b/Modules/index.php new file mode 100644 index 0000000..b3d9bbc --- /dev/null +++ b/Modules/index.php @@ -0,0 +1 @@ +