jcb-compiler/src/95d0e03f-24fd-4412-bc2e-f08...
Robot dc62360576
update 2023-10-04 18:35:53
2023-10-04 20:28:29 +02:00
..
README.md update 2023-10-04 18:35:53 2023-10-04 20:28:29 +02:00
code.php update 2023-10-04 18:35:53 2023-10-04 20:28:29 +02:00
code.power update 2023-10-04 18:35:53 2023-10-04 20:28:29 +02:00
settings.json update 2023-04-15 16:49:30 2023-04-15 16:49:36 +02:00

README.md

██████╗  ██████╗ ██╗    ██╗███████╗██████╗
██╔══██╗██╔═══██╗██║    ██║██╔════╝██╔══██╗
██████╔╝██║   ██║██║ █╗ ██║█████╗  ██████╔╝
██╔═══╝ ██║   ██║██║███╗██║██╔══╝  ██╔══██╗
██║     ╚██████╔╝╚███╔███╔╝███████╗██║  ██║
╚═╝      ╚═════╝  ╚══╝╚══╝ ╚══════╝╚═╝  ╚═╝

final class Parser (Details)

namespace: VDM\Joomla\Componentbuilder\Compiler\Power

@startuml
class Parser << (F,LightGreen) >> #RoyalBlue {
  + code(string $code) : array
  + getClassCode(string $code) : ?string
  + getClassLicense(string $code) : ?string
  + getUseStatements(string $code) : ?array
  + getTraits(string $code) : ?array
  - properties(string $code) : ?array
  - methods(string $code) : ?array
  - extractDocBlock(string $code, string $declaration) : ?string
  - extractMethodBody(string $code, int $startPos) : ?string
  - extractFunctionArgumentDetails(?string $comment, ?string $arguments) : ?array
  - extractReturnType(?string $returnType, ?string $comment) : ?string
  - extractArgTypesFromComment(string $comment) : ?array
  - extractArgTypesArguments(?string $arguments) : ?array
  - extractReturnTypeFromComment(string $comment) : ?string
  - extractSinceVersion(?string $comment) : ?string
  - extractDeprecatedVersion(?string $comment) : ?string
  - removeWhiteSpaceFromComment(string $comment) : string
  - mergeArgumentTypes(array $argTypesFromDeclaration, ?array $argTypesFromComments) : array
}

note right of Parser::code
  Get properties and method declarations and other details from the given code.

  since: 3.2.0
  return: array
end note

note left of Parser::getClassCode
  Get the class body

  since: 3.2.0
  return: ?string
end note

note right of Parser::getClassLicense
  Get the class license

  since: 3.2.0
  return: ?string
end note

note left of Parser::getUseStatements
  Extracts the first consecutive `use` statements from the given PHP class.

  since: 3.2.0
  return: ?array
end note

note right of Parser::getTraits
  Extracts trait use statements from the given code.

  since: 3.2.0
  return: ?array
end note

note left of Parser::properties
  Extracts properties declarations and other details from the given code.

  since: 3.2.0
  return: ?array
end note

note right of Parser::methods
  Extracts method declarations and other details from the given code.

  since: 3.2.0
  return: ?array
end note

note left of Parser::extractDocBlock
  Extracts the PHPDoc block for a given function declaration.

  since: 3.2.0
  return: ?string
end note

note right of Parser::extractMethodBody
  Extracts method body based on starting position of method declaration.

  since: 3.2.0
  return: ?string
end note

note left of Parser::extractFunctionArgumentDetails
  Extracts the function argument details.

  since: 3.2.0
  return: ?array
end note

note right of Parser::extractReturnType
  Extracts the function return type.

  since: 3.2.0
  return: ?string
end note

note left of Parser::extractArgTypesFromComment
  Extracts argument types from a given comment.

  since: 3.2.0
  return: ?array
end note

note right of Parser::extractArgTypesArguments
  Extracts argument types from a given declaration.

  since: 3.2.0
  return: ?array
end note

note left of Parser::extractReturnTypeFromComment
  Extracts return type from a given declaration.

  since: 3.2.0
  return: ?string
end note

note right of Parser::extractSinceVersion
  Extracts the version number from the @since tag in the given comment.

  since: 3.2.0
  return: ?string
end note

note left of Parser::extractDeprecatedVersion
  Extracts the version number from the deprecated tag in the given comment.

  since: 3.2.0
  return: ?string
end note

note right of Parser::removeWhiteSpaceFromComment
  Remove all white space from each line of the comment

  since: 3.2.0
  return: string
end note

note left of Parser::mergeArgumentTypes
  Merges the types from the comments and the arguments.

  since: 3.2.0
  return: array
end note
 
@enduml

     ██╗ ██████╗██████╗
     ██║██╔════╝██╔══██╗
     ██║██║     ██████╔╝
██   ██║██║     ██╔══██╗
╚█████╔╝╚██████╗██████╔╝
 ╚════╝  ╚═════╝╚═════╝

Build with Joomla Component Builder