Skip to content

Commit

Permalink
version 2.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
christopheexakat committed May 4, 2022
1 parent 0759852 commit 2ac1394
Show file tree
Hide file tree
Showing 11 changed files with 914 additions and 241 deletions.
15 changes: 1 addition & 14 deletions Annex.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ List of external links mentioned in this documentation.
* `Add Exakat To Your CI Pipeline <https://www.exakat.io/add-exakat-to-your-ci-pipeline/>`_
* `Allow a trailing comma in function calls <https://wiki.php.net/rfc/trailing-comma-function-calls>`_
* `Alternative PHP Cache <https://www.php.net/apc>`_
* `Alternative syntax <https://www.php.net/manual/en/control-structures.alternative-syntax.php>`_
* `Ambassador <https://exakat.readthedocs.io/en/latest/Reports.html#ambassador>`_
* `Anonymous functions <https://www.php.net/manual/en/functions.anonymous.php>`_
* `Arithmetic Operators <https://www.php.net/manual/en/language.operators.arithmetic.php>`_
Expand All @@ -86,6 +85,7 @@ List of external links mentioned in this documentation.
* `Arrays syntax <https://www.php.net/manual/en/language.types.array.php>`_
* `assert <https://www.php.net/assert>`_
* `Assignation Operators <https://www.php.net/manual/en/language.operators.assignment.php>`_
* `Atif Shahab Qureshi <https://twitter.com/Atif__Shahab>`_
* `Autoloading Classe <https://www.php.net/manual/en/language.oop5.autoload.php>`_
* `Autoloading Classes <https://www.php.net/manual/en/language.oop5.autoload.php>`_
* `Avoid Else, Return Early <http://blog.timoxley.com/post/47041269194/avoid-else-return-early>`_
Expand All @@ -108,7 +108,6 @@ List of external links mentioned in this documentation.
* `Carbon <https://carbon.nesbot.com/docs/>`_
* `Carnage <https://twitter.com/giveupalready>`_
* `cat: write error: Broken pipe <https://askubuntu.com/questions/421663/cat-write-error-broken-pipe>`_
* `catch <https://www.php.net/manual/en/language.exceptions.php#language.exceptions.catch>`_
* `Change the precedence of the concatenation operator <https://wiki.php.net/rfc/concatenation_precedence>`_
* `Changes to variable handling <https://www.php.net/manual/en/migration70.incompatible.php>`_
* `Class Abstraction <https://www.php.net/abstract>`_
Expand Down Expand Up @@ -192,7 +191,6 @@ List of external links mentioned in this documentation.
* `ext/hrtime manual <https://www.php.net/manual/en/intro.hrtime.php>`_
* `ext/leveldb on Github <https://github.com/reeze/php-leveldb>`_
* `ext/mbstring <http://www.php.net/manual/en/book.mbstring.php>`_
* `ext/memcached manual <https://www.php.net/manual/en/book.memcached.php>`_
* `ext/recode <http://www.php.net/manual/en/book.recode.php>`_
* `ext/SeasLog on Github <https://github.com/SeasX/SeasLog>`_
* `ext/sqlite <https://www.php.net/manual/en/book.sqlite.php>`_
Expand All @@ -214,7 +212,6 @@ List of external links mentioned in this documentation.
* `Fluent Interfaces in PHP <http://mikenaberezny.com/2005/12/20/fluent-interfaces-in-php/>`_
* `foreach <https://www.php.net/manual/en/control-structures.foreach.php>`_
* `Frederic Bouchery <https://twitter.com/FredBouchery/>`_
* `Function arguments <https://www.php.net/manual/en/functions.arguments.php>`_
* `Generalize support of negative string offsets <https://wiki.php.net/rfc/negative-string-offsets>`_
* `GeoIP <https://www.php.net/manual/en/book.geoip.php>`_
* `George Peter Banyard <https://twitter.com/Girgias>`_
Expand All @@ -236,7 +233,6 @@ List of external links mentioned in this documentation.
* `Holger Woltersdorf <https://twitter.com/hollodotme>`_
* `How many parameters is too many ? <https://www.exakat.io/how-many-parameters-is-too-many/>`_
* `How to fix Headers already sent error in PHP <http://stackoverflow.com/questions/8028957/how-to-fix-headers-already-sent-error-in-php>`_
* `How to pick bad function and variable names <http://mojones.net/how-to-pick-bad-function-and-variable-names.html>`_
* `htmlentities <https://www.php.net/htmlentities>`_
* `https://hub.docker.com/r/exakat/exakat-ga <https://hub.docker.com/r/exakat/exakat-ga>`_
* `https://www.exakat.io/ <https://www.exakat.io/>`_
Expand All @@ -248,7 +244,6 @@ List of external links mentioned in this documentation.
* `IIS Administration <http://www.php.net/manual/en/book.iisfunc.php>`_
* `IMAP <http://www.php.net/imap>`_
* `Implicit incompatible float to int conversions <https://www.php.net/manual/en/migration81.deprecated.php#migration81.deprecated.core.implicit-float-conversion>`_
* `In a PHP5 class, when does a private constructor get called? <https://stackoverflow.com/questions/26079/in-a-php5-class-when-does-a-private-constructor-get-called>`_
* `in_array() <https://www.php.net/in_array>`_
* `include <https://www.php.net/manual/en/function.include.php>`_
* `include_once <https://www.php.net/manual/en/function.include-once.php>`_
Expand Down Expand Up @@ -301,7 +296,6 @@ List of external links mentioned in this documentation.
* `Ming (flash) <http://www.libming.org/>`_
* `mixed <hhttps://www.php.net/manual/en/language.types.declarations.php#language.types.declarations.mixed>`_
* `MongoDB driver <https://www.php.net/mongo>`_
* `msgpack for PHP <https://github.com/msgpack/msgpack-php>`_
* `mysqli <https://www.php.net/manual/en/book.mysqli.php>`_
* `Ncurses Terminal Screen Control <https://www.php.net/manual/en/book.ncurses.php>`_
* `Nested Ternaries are Great <https://medium.com/javascript-scene/nested-ternaries-are-great-361bddd0f340>`_
Expand Down Expand Up @@ -355,7 +349,6 @@ List of external links mentioned in this documentation.
* `PHP 7.3 UPGRADE NOTES <https://github.com/php/php-src/blob/3b6e1ee4ee05678b5d717cd926a35ffdc1335929/UPGRADING#L66-L81>`_
* `PHP 7.4 Removed Functions <https://www.php.net/manual/en/migration74.incompatible.php#migration70.incompatible.removed-functions>`_
* `PHP <https://www.php.net/>`_
* `PHP class name constant case sensitivity and PSR-11 <https://gist.github.com/bcremer/9e8d6903ae38a25784fb1985967c6056>`_
* `PHP Classes containing only constants <https://stackoverflow.com/questions/16838266/php-classes-containing-only-constants>`_
* `PHP Clone and Shallow vs Deep Copying <http://jacob-walker.com/blog/php-clone-and-shallow-vs-deep-copying.html>`_
* `PHP Constants <https://www.php.net/manual/en/language.constants.php>`_
Expand All @@ -368,7 +361,6 @@ List of external links mentioned in this documentation.
* `PHP RFC: Deprecations for PHP 8.1 <https://wiki.php.net/rfc/deprecations_php_8_1>`_
* `PHP RFC: First-class callable syntax <https://wiki.php.net/rfc/first_class_callable_syntax>`_
* `PHP RFC: noreturn type <https://wiki.php.net/rfc/noreturn_type>`_
* `PHP RFC: Static variables in inherited methods <https://wiki.php.net/rfc/static_variable_inheritance>`_
* `PHP RFC: Syntax for variadic functions <https://wiki.php.net/rfc/variadics>`_
* `PHP RFC: Unicode Codepoint Escape Syntax <https://wiki.php.net/rfc/unicode_escape>`_
* `PHP Tags <https://www.php.net/manual/en/language.basic-syntax.phptags.php>`_
Expand Down Expand Up @@ -405,7 +397,6 @@ List of external links mentioned in this documentation.
* `Restrict $GLOBALS usage <https://wiki.php.net/rfc/restrict_globals_usage>`_
* `return <https://www.php.net/manual/en/function.return.php>`_
* `Return Inside Finally Block <https://www.owasp.org/index.php/Return_Inside_Finally_Block>`_
* `Return Type Declaration <https://www.php.net/manual/en/functions.returning-values.php#functions.returning-values.type-declaration>`_
* `Returning values <https://www.php.net/manual/en/functions.returning-values.php>`_
* `RFC 7159 <http://www.faqs.org/rfcs/rfc7159>`_
* `RFC 7230 <https://tools.ietf.org/html/rfc7230>`_
Expand Down Expand Up @@ -437,7 +428,6 @@ List of external links mentioned in this documentation.
* `Subpatterns <https://www.php.net/manual/en/regexp.reference.subpatterns.php>`_
* `substr <http://www.php.net/substr>`_
* `Suhosin.org <https://suhosin.org/>`_
* `Supported PHP Extensions <http://exakat.readthedocs.io/en/latest/Annex.html#supported-php-extensions>`_
* `Supported Protocols and Wrappers <https://www.php.net/manual/en/wrappers.php>`_
* `SVM <http://www.php.net/svm>`_
* `Svn <https://subversion.apache.org/>`_
Expand All @@ -451,13 +441,11 @@ List of external links mentioned in this documentation.
* `The Linux NIS(YP)/NYS/NIS+ HOWTO <http://www.tldp.org/HOWTO/NIS-HOWTO/index.html>`_
* `The main PPA for PHP (8.0, 7.4, 7.3, 7.2, 7.1, 7.0, 5.6) <https://launchpad.net/~ondrej/+archive/ubuntu/php>`_
* `The “never” Return Type for PHP <https://betterprogramming.pub/the-never-return-type-for-php-802fbe2fa303>`_
* `Throwable <https://www.php.net/manual/en/class.throwable.php>`_
* `tokenizer <http://www.php.net/tokenizer>`_
* `tokyo_tyrant <https://www.php.net/manual/en/book.tokyo-tyrant.php>`_
* `trigger_error <https://www.php.net/trigger_error>`_
* `trim <https://www.php.net/manual/en/function.trim.php>`_
* `Tutorial 1: Let’s learn by example <https://docs.phalconphp.com/en/latest/reference/tutorial.html>`_
* `Type array <https://www.php.net/manual/en/language.types.array.php>`_
* `Type Casting <https://php.net/manual/en/language.types.type-juggling.php#language.types.typecasting>`_
* `Type Declaration <https://www.php.net/manual/en/functions.arguments.php#functions.arguments.type-declaration>`_
* `Type declarations <https://www.php.net/manual/en/functions.arguments.php#functions.arguments.type-declaration>`_
Expand Down Expand Up @@ -498,7 +486,6 @@ List of external links mentioned in this documentation.
* `Wincache extension for PHP <http://www.php.net/wincache>`_
* `workflow_dispatch <https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow>`_
* `www.exakat.io <https://www.exakat.io/versions/>`_
* `xattr <https://www.php.net/manual/en/book.xattr.php>`_
* `xcache <https://xcache.lighttpd.net/>`_
* `xdiff <https://www.php.net/manual/en/book.xdiff.php>`_
* `XHprof Documentation <http://web.archive.org/web/20110514095512/http://mirror.facebook.net/facebook/xhprof/doc.html>`_
Expand Down
35 changes: 29 additions & 6 deletions Changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Release Note

Here is the release note of exakat.

**Version 2.4.1 (****, 2022-05-04)**
**Version 2.4.2 (Li Chunfeng, 2022-05-04)**


+ Architecture
Expand All @@ -24,15 +24,41 @@ Here is the release note of exakat.
+ Tokenizer
+

**Version 2.4.0 (Yin Kaishan, 2022-04-20)**
**Version 2.4.1 (Yuan Tiangang, 2022-05-04)**


+ Architecture
+
+ New Dump : collect all stub's structures

+ Cobbler
+

+ Report
+ Sarif : Fixed URI (no initial /) and Exakat version
+ Unused : report unused stuff in the code
+ Ambassador : upgrade presentation of the Exception Treephp

+ Analysis
+ New analysis : Deprecated String interpolation in PHP 8.2
+ Refactored analysis : Spaceship features is used for isRead property
+ Refactored analysis : Skip analysis of returntypes for methods with throw/assert/trigger_error()
+ New analysis : Report unused Enumeration Cases
+ Refactored analysis : Can't instantiate class now takes local class into account
+ Refactored analysis : Many new examples extracted from the docs
+ Refactored analysis : fixed bug with 'Wrong Type With Call'
+ Refactored analysis : Conditional structures now includes Enums too.
+ New analysis : Don't throw raw exceptions
+ New analysis : Useless Coalesce operator (when there is a type available)
+ New analysis : ext/yar
+ Refactored analysis : 'Wrong number of argument' now includes methods defined in a trait in a PDFF
+ Refactored analysis : moved ext/amqp to PDFF

+ Tokenizer
+

**Version 2.4.0 (Yin Kaishan, 2022-04-20)**


+ Report
+ Ambassador : suggest literals to be turned into a constant, based on assignation and comparison

Expand All @@ -48,9 +74,6 @@ Here is the release note of exakat.
+ Refactored analysis : Vendors/Joomla is updated to Joomla 4.2.0
+ Refactored analysis : Wrong Number Of Arguments supports Constructors and methods (static and normal)

+ Tokenizer
+

**Version 2.3.9 (Fu Yi, 2022-04-06)**


Expand Down
2 changes: 1 addition & 1 deletion Introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Introduction
============

This is the documentation of the Exakat engine, version 2.4.0 (Build 1309), on Thu, 07 Apr 2022 14:22:14 +0000.
This is the documentation of the Exakat engine, version 2.4.1 (Build 1314), on Thu, 28 Apr 2022 09:38:49 +0000.

What is Exakat ?
----------------
Expand Down
8 changes: 4 additions & 4 deletions Reference/Cases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -396,18 +396,18 @@ $this->fk_product is tested for value 11 times while being used in this class. A
$sql .= ' fk_product = '.(isset($this->fk_product) ? $this->fk_product : "null").',';
.. _case-cant-instantiate-class:
.. _case-can't-instantiate-class:

Cant Instantiate Class
######################
Can't Instantiate Class
#######################

.. _case-wordpress-classes-cantinstantiateclass:

WordPress
+++++++++


:ref:`cant-instantiate-class`, in wp-admin/includes/misc.php:74.
:ref:`can't-instantiate-class`, in wp-admin/includes/misc.php:74.

This code actually loads the file, join it, then split it again. file() would be sufficient.

Expand Down
61 changes: 53 additions & 8 deletions Reference/Reports.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ Summary
* :ref:`CompatibilityPHP74 <report-compatibilityphp74>`
* :ref:`CompatibilityPHP80 <report-compatibilityphp80>`
* :ref:`CompatibilityPHP81 <report-compatibilityphp81>`
* :ref:`Unused <report-unused>`



Expand Down Expand Up @@ -548,8 +549,8 @@ This Report may be configured with the [Exakatjson] section, to provide the uuid

::

[Exakatjson]
uuid=1234567abcd;
[Exakatjson]
uuid=1234567abcd;



Expand Down Expand Up @@ -1495,12 +1496,12 @@ Exakat measures a large number of code dimensions, such as number of files, line

::

{
loc: 95950,
locTotal: 140260,
files: 1824,
tokens: 677213
}
{
loc: 95950,
locTotal: 140260,
files: 1824,
tokens: 677213
}



Expand Down Expand Up @@ -3680,6 +3681,50 @@ Specs
+--------------+-------------------------------------+


.. _report-unused:

Unused
######

Unused
______

Unused lists unused pieces of code in the source.

The Unused report reports structures that are defined in the code, but never used.

+ Constants
+ Functions, methods, properties
+ Classes, Enumration, traits and interfaces
+ Return values and parameters
+ Default values
+ Never used
+ Written only variables and properties
+ Unreachable methods and constants
+ Unreachable code



.. image:: ../images/report.unused.png
:alt: Example of a Unused report (0)



Specs
^^^^^
+--------------+-------------------------------------+
| Short name | Unused |
+--------------+-------------------------------------+
| Rulesets | Unused. |
+--------------+-------------------------------------+
| Type | HTML |
+--------------+-------------------------------------+
| Target | This report is written in 'report'. |
+--------------+-------------------------------------+
| Available in | |
+--------------+-------------------------------------+





0 comments on commit 2ac1394

Please sign in to comment.