Skip to content

Commit

Permalink
Fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
marcospassos committed Jul 7, 2017
1 parent 0c82d16 commit f311ac7
Show file tree
Hide file tree
Showing 30 changed files with 98 additions and 100 deletions.
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
package com.marcospassos.phpserializer;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.marcospassos.phpserializer.adapter.ArrayAdapter;
import com.marcospassos.phpserializer.adapter.BooleanAdapter;
import com.marcospassos.phpserializer.adapter.IntegerAdapter;
import com.marcospassos.phpserializer.adapter.CollectionAdapter;
import com.marcospassos.phpserializer.adapter.MapAdapter;
import com.marcospassos.phpserializer.adapter.IntegerAdapter;
import com.marcospassos.phpserializer.adapter.ObjectAdapter;
import com.marcospassos.phpserializer.adapter.ReferableObjectAdapter;
import com.marcospassos.phpserializer.adapter.StringAdapter;
import com.marcospassos.phpserializer.exclusion.DisjunctionExclusionStrategy;
import com.marcospassos.phpserializer.exclusion.NoExclusionStrategy;
import com.marcospassos.phpserializer.naming.PsrNamingStrategy;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
* Provides a friendly API for creating instances of {@link Serializer}.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/marcospassos/phpserializer/Writer.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

package com.marcospassos.phpserializer;

import com.marcospassos.phpserializer.state.WritingValueState;
import java.lang.reflect.Modifier;
import com.marcospassos.phpserializer.state.WritingValueState;

/**
* Writes a values in PHP's serialization format.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.marcospassos.phpserializer.adapter;

import java.lang.reflect.Array;
import com.marcospassos.phpserializer.Context;
import com.marcospassos.phpserializer.TypeAdapter;
import com.marcospassos.phpserializer.Writer;
import java.lang.reflect.Array;

/**
* Adapter for handling arrays.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.marcospassos.phpserializer.adapter;

import java.util.Collection;
import com.marcospassos.phpserializer.Context;
import com.marcospassos.phpserializer.TypeAdapter;
import com.marcospassos.phpserializer.Writer;
import java.util.Collection;

/**
* Adapter for handling collections.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.marcospassos.phpserializer.adapter;

import java.util.Map;
import com.marcospassos.phpserializer.Context;
import com.marcospassos.phpserializer.TypeAdapter;
import com.marcospassos.phpserializer.Writer;
import java.util.Map;

/**
* Adapter for handling maps.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package com.marcospassos.phpserializer.adapter;

import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
import com.marcospassos.phpserializer.Context;
import com.marcospassos.phpserializer.FieldExclusionStrategy;
import com.marcospassos.phpserializer.NamingStrategy;
import com.marcospassos.phpserializer.TypeAdapter;
import com.marcospassos.phpserializer.Writer;
import com.marcospassos.phpserializer.util.ReflectionUtils;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;

/**
* Adapter for string values.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.marcospassos.phpserializer.exclusion;

import com.marcospassos.phpserializer.FieldExclusionStrategy;
import java.lang.reflect.Field;
import com.marcospassos.phpserializer.FieldExclusionStrategy;

/**
* Aggregates multiple exclusion strategies to perform a short-circuit OR
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.marcospassos.phpserializer.exclusion;

import com.marcospassos.phpserializer.FieldExclusionStrategy;
import java.lang.reflect.Field;
import com.marcospassos.phpserializer.FieldExclusionStrategy;

/**
* A strategy to exclude nothing.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.marcospassos.phpserializer.naming;

import com.marcospassos.phpserializer.NamingStrategy;
import java.lang.reflect.Field;
import com.marcospassos.phpserializer.NamingStrategy;

/**
* Translates names of classes and methods from Java to PHP PSR-1 standard.
Expand Down
8 changes: 4 additions & 4 deletions src/test/java/com/marcospassos/phpserializer/ContextTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package com.marcospassos.phpserializer;

import java.util.ArrayList;
import org.junit.Before;
import org.junit.Test;

import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertSame;
Expand All @@ -8,10 +12,6 @@
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

import java.util.ArrayList;
import org.junit.Before;
import org.junit.Test;

/**
* @author Marcos Passos
* @since 1.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
package com.marcospassos.phpserializer;

import java.lang.reflect.Field;
import java.util.Map;
import com.marcospassos.phpserializer.exclusion.DisjunctionExclusionStrategy;
import com.marcospassos.phpserializer.exclusion.NoExclusionStrategy;
import com.marcospassos.phpserializer.naming.PsrNamingStrategy;
import org.junit.Test;
import org.mockito.ArgumentCaptor;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
Expand All @@ -8,14 +16,6 @@
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

import com.marcospassos.phpserializer.exclusion.DisjunctionExclusionStrategy;
import com.marcospassos.phpserializer.exclusion.NoExclusionStrategy;
import com.marcospassos.phpserializer.naming.PsrNamingStrategy;
import java.lang.reflect.Field;
import java.util.Map;
import org.junit.Test;
import org.mockito.ArgumentCaptor;

/**
* @author Marcos Passos
* @since 1.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.marcospassos.phpserializer;

import static org.junit.Assert.assertEquals;

import com.marcospassos.phpserializer.adapter.IntegerAdapter;
import com.marcospassos.phpserializer.exclusion.NoExclusionStrategy;
import com.marcospassos.phpserializer.naming.PsrNamingStrategy;
import org.junit.Test;

import static org.junit.Assert.assertEquals;

/**
* @author Marcos Passos
* @since 1.0
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/com/marcospassos/phpserializer/WriterTest.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.marcospassos.phpserializer;

import static org.junit.Assert.assertEquals;

import java.lang.reflect.Modifier;
import org.junit.Test;

import static org.junit.Assert.assertEquals;

/**
* @author Marcos Passos
* @since 1.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.marcospassos.phpserializer.adapter;

import static org.mockito.Mockito.inOrder;
import static org.mockito.Mockito.mock;

import com.marcospassos.phpserializer.Context;
import com.marcospassos.phpserializer.Writer;
import org.junit.Test;
import org.mockito.InOrder;

import static org.mockito.Mockito.inOrder;
import static org.mockito.Mockito.mock;

/**
* @author Marcos Passos
* @since 1.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.marcospassos.phpserializer.adapter;

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;

import com.marcospassos.phpserializer.Context;
import com.marcospassos.phpserializer.Writer;
import org.junit.Test;

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;

/**
* @author Marcos Passos
* @since 1.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package com.marcospassos.phpserializer.adapter;

import static org.mockito.Mockito.inOrder;
import static org.mockito.Mockito.mock;

import com.marcospassos.phpserializer.Context;
import com.marcospassos.phpserializer.Writer;
import java.util.Arrays;
import java.util.Collection;
import com.marcospassos.phpserializer.Context;
import com.marcospassos.phpserializer.Writer;
import org.junit.Test;
import org.mockito.InOrder;

import static org.mockito.Mockito.inOrder;
import static org.mockito.Mockito.mock;

/**
* @author Marcos Passos
* @since 1.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.marcospassos.phpserializer.adapter;

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;

import com.marcospassos.phpserializer.Context;
import com.marcospassos.phpserializer.Writer;
import org.junit.Test;

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;

/**
* @author Marcos Passos
* @since 1.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.marcospassos.phpserializer.adapter;

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;

import com.marcospassos.phpserializer.Context;
import com.marcospassos.phpserializer.Writer;
import org.junit.Test;

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;

/**
* @author Marcos Passos
* @since 1.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package com.marcospassos.phpserializer.adapter;

import static org.mockito.Mockito.inOrder;
import static org.mockito.Mockito.mock;

import com.marcospassos.phpserializer.Context;
import com.marcospassos.phpserializer.Writer;
import java.util.HashMap;
import java.util.Map;
import com.marcospassos.phpserializer.Context;
import com.marcospassos.phpserializer.Writer;
import org.junit.Test;
import org.mockito.InOrder;

import static org.mockito.Mockito.inOrder;
import static org.mockito.Mockito.mock;

/**
* @author Marcos Passos
* @since 1.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
package com.marcospassos.phpserializer.adapter;

import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.inOrder;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import com.marcospassos.phpserializer.Context;
import com.marcospassos.phpserializer.FieldExclusionStrategy;
import com.marcospassos.phpserializer.NamingStrategy;
import com.marcospassos.phpserializer.Writer;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import org.junit.Test;
import org.mockito.InOrder;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;

import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.inOrder;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

public class ObjectAdapterTest
{
private class Subject
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package com.marcospassos.phpserializer.adapter;

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

import com.marcospassos.phpserializer.Context;
import com.marcospassos.phpserializer.TypeAdapter;
import com.marcospassos.phpserializer.Writer;
import org.junit.Test;

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

/**
* @author Marcos Passos
* @since 1.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.marcospassos.phpserializer.adapter;

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;

import com.marcospassos.phpserializer.Context;
import com.marcospassos.phpserializer.Writer;
import org.junit.Test;

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;

/**
* @author Marcos Passos
* @since 1.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package com.marcospassos.phpserializer.exclusion;

import java.lang.reflect.Field;
import com.marcospassos.phpserializer.FieldExclusionStrategy;
import org.junit.Test;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

import com.marcospassos.phpserializer.FieldExclusionStrategy;
import java.lang.reflect.Field;
import org.junit.Test;

/**
* @author Marcos Passos
* @since 1.0
Expand Down
Loading

0 comments on commit f311ac7

Please sign in to comment.