Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

Commit

Permalink
fixed CS
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Jul 9, 2012
1 parent 5d8ded6 commit 5256043
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 22 deletions.
18 changes: 9 additions & 9 deletions ClassCollectionLoader.php
Expand Up @@ -18,8 +18,8 @@
*/
class ClassCollectionLoader
{
static private $loaded;
static private $seen;
private static $loaded;
private static $seen;

/**
* Loads a list of classes and caches them in one big file.
Expand All @@ -33,7 +33,7 @@ class ClassCollectionLoader
*
* @throws \InvalidArgumentException When class can't be loaded
*/
static public function load($classes, $cacheDir, $name, $autoReload, $adaptive = false, $extension = '.php')
public static function load($classes, $cacheDir, $name, $autoReload, $adaptive = false, $extension = '.php')
{
// each $name can only be loaded once per PHP process
if (isset(self::$loaded[$name])) {
Expand Down Expand Up @@ -133,7 +133,7 @@ static public function load($classes, $cacheDir, $name, $autoReload, $adaptive =
*
* @return string Namespaces with brackets
*/
static public function fixNamespaceDeclarations($source)
public static function fixNamespaceDeclarations($source)
{
if (!function_exists('token_get_all')) {
return $source;
Expand Down Expand Up @@ -188,7 +188,7 @@ static public function fixNamespaceDeclarations($source)
*
* @throws \RuntimeException when a cache file cannot be written
*/
static private function writeCacheFile($file, $content)
private static function writeCacheFile($file, $content)
{
$tmpFile = tempnam(dirname($file), basename($file));
if (false !== @file_put_contents($tmpFile, $content) && @rename($tmpFile, $file)) {
Expand All @@ -210,7 +210,7 @@ static private function writeCacheFile($file, $content)
*
* @return string The PHP string with the comments removed
*/
static private function stripComments($source)
private static function stripComments($source)
{
if (!function_exists('token_get_all')) {
return $source;
Expand Down Expand Up @@ -240,7 +240,7 @@ static private function stripComments($source)
*
* @throws \InvalidArgumentException When a class can't be loaded
*/
static private function getOrderedClasses(array $classes)
private static function getOrderedClasses(array $classes)
{
$map = array();
self::$seen = array();
Expand All @@ -257,7 +257,7 @@ static private function getOrderedClasses(array $classes)
return $map;
}

static private function getClassHierarchy(\ReflectionClass $class)
private static function getClassHierarchy(\ReflectionClass $class)
{
if (isset(self::$seen[$class->getName()])) {
return array();
Expand Down Expand Up @@ -294,7 +294,7 @@ static private function getClassHierarchy(\ReflectionClass $class)
return $classes;
}

static private function getTraits(\ReflectionClass $class)
private static function getTraits(\ReflectionClass $class)
{
$traits = $class->getTraits();
$classes = array();
Expand Down
6 changes: 3 additions & 3 deletions ClassMapGenerator.php
Expand Up @@ -24,7 +24,7 @@ class ClassMapGenerator
* @param array|string $dirs Directories or a single path to search in
* @param string $file The name of the class map file
*/
static public function dump($dirs, $file)
public static function dump($dirs, $file)
{
$dirs = (array) $dirs;
$maps = array();
Expand All @@ -43,7 +43,7 @@ static public function dump($dirs, $file)
*
* @return array A class map array
*/
static public function createMap($dir)
public static function createMap($dir)
{
if (is_string($dir)) {
$dir = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($dir));
Expand Down Expand Up @@ -80,7 +80,7 @@ static public function createMap($dir)
*
* @return array The found classes
*/
static private function findClasses($path)
private static function findClasses($path)
{
$contents = file_get_contents($path);
$tokens = token_get_all($contents);
Expand Down
2 changes: 1 addition & 1 deletion DebugClassLoader.php
Expand Up @@ -42,7 +42,7 @@ public function __construct($classFinder)
/**
* Replaces all autoloaders implementing a findFile method by a DebugClassLoader wrapper.
*/
static public function enable()
public static function enable()
{
if (!is_array($functions = spl_autoload_functions())) {
return;
Expand Down
2 changes: 1 addition & 1 deletion DebugUniversalClassLoader.php
Expand Up @@ -21,7 +21,7 @@ class DebugUniversalClassLoader extends UniversalClassLoader
/**
* Replaces all regular UniversalClassLoader instances by a DebugUniversalClassLoader ones.
*/
static public function enable()
public static function enable()
{
if (!is_array($functions = spl_autoload_functions())) {
return;
Expand Down
16 changes: 8 additions & 8 deletions Tests/Fixtures/php5.4/traits.php
@@ -1,7 +1,7 @@
<?php
namespace {
trait TFoo {

trait TFoo
{
}

class CFoo
Expand All @@ -11,16 +11,16 @@ class CFoo
}

namespace Foo {
trait TBar {

trait TBar
{
}

interface IBar {

interface IBar
{
}

trait TFooBar {

trait TFooBar
{
}

class CBar implements IBar
Expand Down

0 comments on commit 5256043

Please sign in to comment.